Making auto play loop stop after one time time through

940 views
Skip to first unread message

Will

unread,
Aug 30, 2011, 1:03:49 AM8/30/11
to SlidesJS
I'd like the player to stop after one time through the slides. Is
there an easy way to do this?

mplungjan

unread,
Oct 17, 2011, 10:43:29 AM10/17/11
to SlidesJS
$(function(){
var total = $("#slides img").length - 2; // Subtract Two arrows
$('#slides').slides({
animationComplete: function(current) {
if (current >= total) {
clearInterval($('#slides').data('interval'));
$(".pagination").remove();
$(".prev").remove();
$(".next").remove();
}
},
preload: true,
preloadImage: 'http://slidesjs.com/img/loading.gif',
play: 5000,
pause: 2500,
slideSpeed: 600,
hoverPause: true
});
});
Reply all
Reply to author
Forward
0 new messages