View Full Version : get stepcarousel to load sooner?

03-09-2011, 07:26 PM
1) Script Title: Stepcarousel

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem: I notice that the step carousel does not load until everything else on our page has finished loading, the carousel just doesn't work until then, and I verified this using oninit:function() with an alert. We have a lot of junk on our page, stuff we need to make money, ads and all kinds of other junk that depends on 3rd parties servers, plus a bunch of blog posts with images, so it usually take at least 30 seconds to finish loading, sometimes over a minute, depending on this other stuff, so anyway the html and images for the carousel are loaded, but don't do anything yet, and a site visitor who tries it right off the bat (we have it at the top of the page) is going to think it doesn't even work...

so anyway is there some way to get the carousel working earlier, as soon as the html and images are ready to go, instead of waiting for everything on the page to load?

03-10-2011, 02:57 AM
What, no response yet! lol, I figured something out already:

put stepcarousel.setup right after the carousel containing element, then go and hack stepcarousel.js, I just got rid of the jQuery ready function in setup, and made it so those 2 lines that were in that function execute right away, not handled by the 'ready' event any more

doing that caused a bunch of '$ is not a function' errors, so I just did find replace '$(' with 'jQuery(' on the whole file, not sure if that's the best way to go about it but it seems to work pretty well now...