Hi everybody! I found out this script for jQuery that allows to have a nice slideshow with different captions for each slide.
Here's my demo, everything works fine except the "random" slides (with their captions though, not mixed!!) function...
In the comments a user says:Quote So I added these lines (as author also said):Quote But it didn't work... Captions and slides get mixed and it's a mess..
May I ask your help..?
Thanks!!!!
Here's my demo, everything works fine except the "random" slides (with their captions though, not mixed!!) function...
In the comments a user says:
Make a random number, and then address a list item with li:eq(X) as seen here:
$('ul.slideshow li:eq('+randNum+')').addClass('show');
By the way, that line also fixes a bug if you don't start with a li that has class="show" (which you wouldn't if you are randomly starting). If that class isn't added to the one that you randomly start with, it will keep "popping up" between fades on the other list items, until the slide show gets around to the second display of the image when it applies
current.animate({opacity: 0.0}, 500).removeClass('show');
//Generate a random number
var randNum = Math.floor(Math.random() * $('ul.slideshow li').length);
//Randomly pick up a slide
$('ul.slideshow li:eq('+randNum+')').addClass('show');
May I ask your help..?
Thanks!!!!