views:

28

answers:

1

I'm successfully using Simple Modal to launch a modal when a button is clicked, however, I want the page to scroll to the top first. I tried placing an anchor tag at the top of the page and referencing it in my link using , but it didn't work. The Simple Modal still worked, but it didn't scroll to the top of the page first. Is there a way to edit the simple modal javascript to make it first scroll to the top of the page before the modal is opened?

A: 

use JavaScript before you call your modal: window.scrollTo(0,0)

Diodeus