I have a working jQuery slideshow on my site. I also have a working script that sequentially loads elements on a page. I want to use the sequential loader on one of my slideshow pages.
The loader script is programmed to start on pageload (i.e. at the first slide); what's the best way to set it to start at the slide I want?
I don't want to use 'onclick' since the whole show is automated, so unless someone knows another way to trigger it when the correct slide comes up, I'm resorting to timeout, which I can't get to work.
Here's the working code:
$(window).load(function() {
$("#func_id").myfunc();
});
[The function is applied to <div id="func_id">]
Here's the non-working timeout I tried:
run_func {
$("#func_id").myfunc();
};
$(window).load(function() {
setTimeout(run_func, 10000);
});
I tested it using a simple alert in run_func and it still doesn't work, so it seems like something's wrong with the timeout.