View Full Version : JQuery scroll to top of iframe parent

09-27-2010, 05:44 PM

I have an iframe with a feeback form in it. After clicking submit, I want use parent window to scroll to the top. I know I can scroll to the top of a page with:

$(\'html, body\').animate({scrollTop:0}, \'slow\');

However, this will only scroll the contents of the iframe, not the parent page. Any suggestions? :)

09-27-2010, 06:36 PM
I'm unfamiliar with jQuery, as I've created my own frameworks, but try:

window.top.window.animate({scrollTop:0}, \'slow\');