views:

19

answers:

1

Hi,

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? :)

A: 

Give a try for this one :

window.parent.$("body").animate({scrollTop:0}, 'slow');
xar
That seems to have done the trick! Thank you :)