Note that there are some explanatory texts on larger screens.

plurals
  1. POMake image banner rotate automatically AND on click
    primarykey
    data
    text
    <p>I'm trying to create an image banner that changes on click AND rotates automatically. I was able to use what user Oriol added to a previous post, "Image Gallery Thumbnails Slider," and it worked perfectly. This is the original jsfiddle: </p> <p><a href="http://jsfiddle.net/L7yKp/4/" rel="nofollow">http://jsfiddle.net/L7yKp/4/</a></p> <pre><code>var xml = "&lt;rss version='2.0'&gt;&lt;channel&gt;"+ "&lt;image&gt;http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png&lt;/image&gt;"+ "&lt;image&gt;http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png&lt;/image&gt;"+ "&lt;image&gt;http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png&lt;/image&gt;"+ "&lt;limage&gt;http://images1.videolan.org/images/largeVLC.png&lt;/limage&gt;"+ "&lt;limage&gt;http://images1.videolan.org/images/largeVLC.png&lt;/limage&gt;"+ "&lt;limage&gt;http://images1.videolan.org/images/largeVLC.png&lt;/limage&gt;"+ "&lt;/channel&gt;&lt;/rss&gt;", $xml = $( $.parseXML(xml) ), $images=$([ //[elements, place, className], [$xml.find("image") ,"#thumbs",'thumbnails'], [$xml.find("limage"),"#panel" ,'largeimages'] ]); $images.each(function(){ var that=this; that[0].each(function(){ $(that[1]).append($('&lt;img&gt;', {class: that[2], src:$(this).text()})); }); }); $("#thumbs&gt;img").click(function(){ $("#thumbs&gt;img.clicked").removeClass('clicked'); $("#panel&gt;img").hide(); $("#panel&gt;img:nth-child("+Number($(this).index()+1)+")").fadeIn(); $(this).addClass('clicked'); }); $("#thumbs&gt;img:first").click(); $('#next').click(function(){ $('#thumbs&gt;img.clicked').next().click(); }); $('#prev').click(function(){ $('#thumbs&gt;img.clicked').prev().click(); }); </code></pre> <p>I was able to customize it so that my banner changes when I click a thumbnail or previous/next button. So, my question is...</p> <p>What can I add to this code to make the banner change automatically as well? Is there something I can just insert here?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload