Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    238
    Thanks
    9
    Thanked 0 Times in 0 Posts

    JQuery scroll to top of iframe parent

    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:

    Code:
    $(\'html, body\').animate({scrollTop:0}, \'slow\');
    However, this will only scroll the contents of the iframe, not the parent page. Any suggestions?

  • #2
    Regular Coder
    Join Date
    May 2009
    Posts
    425
    Thanks
    3
    Thanked 62 Times in 61 Posts
    I'm unfamiliar with jQuery, as I've created my own frameworks, but try:
    Code:
    window.top.window.animate({scrollTop:0}, \'slow\');


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •