I try to show each image a different amount of time shown and thought that I can use the loop plugin, but I can not get it to work, here is the whole code
JQuery
$(document).ready(function(){
$('.slideshow ').cycle({
fx: 'fade',
speed: 'fast',
timeoutFn: function () {
return parseInt($(".slideshow img").attr('data-duration')) ;
}
});
});
HTML
<div class="slideshow">
<img data-duration="5400" src="beach1.jpg" width="200" height="200" />
<img data-duration="50" src="beach2.jpg" width="200" height="200" />
<img data-duration="50" src="beach3.jpg" width="200" height="200" />
<img data-duration="50" src="beach4.jpg" width="200" height="200" />
<img data-duration="50" src="beach5.jpg" width="200" height="200" />
</div>
what am I doing wrong?
Thanks for any help :)
Liam
source
share