Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-29-2009, 07:33 PM   PM User | #1
jrp1
New Coder

 
Join Date: Jul 2008
Posts: 55
Thanks: 3
Thanked 4 Times in 4 Posts
jrp1 is an unknown quantity at this point
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?
jrp1 is offline   Reply With Quote
Old 06-30-2009, 04:35 PM   PM User | #2
jrp1
New Coder

 
Join Date: Jul 2008
Posts: 55
Thanks: 3
Thanked 4 Times in 4 Posts
jrp1 is an unknown quantity at this point
anyone? *bump*
jrp1 is offline   Reply With Quote
Old 06-30-2009, 09:08 PM   PM User | #3
jrp1
New Coder

 
Join Date: Jul 2008
Posts: 55
Thanks: 3
Thanked 4 Times in 4 Posts
jrp1 is an unknown quantity at this point
Solution: http://www.geekdaily.net/2007/07/27/...d-is-bad-mkay/
jrp1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:03 PM.


Advertisement
Log in to turn off these ads.