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 3 of 3

Thread: OnLoad

  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts

    OnLoad

    Hey everyone,

    I currently have a jQuery scrolling plugin to scroll to a certain point on the page to execute onload. Here's the code:

    Code:
    <body onLoad="if($.browser.opera){$('html').animate({scrollTop: $('#div').offset().top}, 2000);} else $('html,body').animate({scrollTop: $('#div').offset().top}, 2000);>
    The only problem with this is onload executes after all my content is loaded, and I have a sizeable amount of flash and images that all have to load first in order for the page to start scrolling.

    Is there any way to have this code execute first in <script> tags or something?

  • #2
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts
    anyone? *bump*

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    55
    Thanks
    3
    Thanked 4 Times in 4 Posts


  •  

    Posting Permissions

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