hi I am new to javascript currently I have a website with a big banner at the header of website. This big banner is consists with three pictures. each pictures will display once according to their order, and after first cycle the banner will stop at the first one which in javascript code is set to be "0" please see details below My problem is that I want to make banner to repeat as much time as it could, but not only once. How can I do that, I try to use "for" and "while" but couldn't work may be I am just too new to fixed this simple problem my website is choiceware.com.au and the banner with problem is the big banner in the header position. thanks in advance.
I don't know about jQuery but in javascript it's something like this setTimeout('slider_intro()', 3000);
jQuery(window).bind("load", function () { jQuery("div#mygalone").slideView(); var slider_links = jQuery('.stripTransmitter li a'); var slider_links_index = 0; function slider_intro() { slider_links.eq(slider_links_index).trigger('click'); slider_links_index++; if (slider_links_index <= slider_links.size()) { setTimeout(function () { slider_intro() }, 3000); //select change time } else if (slider_links_index > slider_links.size()) { slider_links.eq(0).trigger('click'); // restart after 3 seconds setTimeout(function() { slider_links_index = 0; slider_intro(); }, 3000); } } slider_intro(); }); Code (javascript): perhaps something like this. a self-calling function is not how i'd code this though, probably i'd use something like var timer = setInterval(function() { do something to an image }, 3000); instead.