April 12, 201313 yr Hi guys, I'm looking for a script to have like a "slideshow" of pictures. Do you guys have a preferred script in order to achieve this? Please let me know. Thanks
April 12, 201313 yr There are tons of slideshow plugins. Assuming you're familiar with Javascript and JQuery, the following is what I usually use. http://www.slidesjs.com/ Though if that doesn't fulfill your needs, have a look here: http://vandelaydesign.com/blog/web-development/jquery-slideshow/ Regards Edited April 12, 201313 yr by Pete Prosper
April 12, 201313 yr The below code is a snippet from what I use on my site to change fade in and out between id's at a specific number of intervals. It doesn't change the src of an image, but is easily done as well. This should give you the basis for what you need though. If you need more I can event comment the code for you explaining what each line does. This of course needs the jquery library. <script type="text/javascript"> jQuery(document).ready(function() { var InfiniteRotator = { init: function() { var initialDelay = 2000; var initialFade = 3000; var intTime = 10000; var fadeTime = 2000; var currentItem = 1; var numberOfItems = 2; setTimeout(function() {$('#id'+currentItem).fadeIn(initialFade);}, initialDelay); var infiniteLoop = setInterval(function(){ $('#promo'+currentItem).fadeOut(fadeTime); if (currentItem == numberOfItems) {currentItem = 1;} else {currentItem++;} setTimeout(function() {$('#id'+currentItem).fadeIn(fadeTime);}, fadeTime); }, intTime); } }; InfiniteRotator.init(); }); </script> Edited April 12, 201313 yr by Nullified
April 15, 201313 yr Author Thanks a lot guys. I'll have a look at these options and get back to you ASAP. Thanks again -Ian
Create an account or sign in to comment