homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

function loading
convert onload to timeout

 6:28 pm on Dec 30, 2011 (gmt 0)

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() {

[The function is applied to <div id="func_id">]

Here's the non-working timeout I tried:

run_func {

$(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.



 7:55 pm on Dec 30, 2011 (gmt 0)

I got this:

run_func {

should be:

function run_func() {

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved