...

View Full Version : OnLoad



jrp1
06-29-2009, 07:33 PM
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:


<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
06-30-2009, 04:35 PM
anyone? *bump*

jrp1
06-30-2009, 09:08 PM
Solution: http://www.geekdaily.net/2007/07/27/javascript-windowonload-is-bad-mkay/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum