$(document).ready(function() {
// simplest example
$('.simpleSlideShow, .slideShowTopNavi').slideShow({
interval: 3
});
// slideshow with mouse hover
$('.useMouseSlideShow').slideShow({
hoverNavigation: true,
interval: false
});
// slideshow with images
$('.imageNavigation').slideShow({
interval: 3
});
// random slideshow
$('.randomSlideShow').slideShow({
interval: 3
});
// slideshow with play/pause
var slideShow = $('.playPauseExample').slideShow({
interval: 0.7
});
// now add logic to play/pause button
$('.playPauseExample a.togglePlayback').click(function() {
if (slideShow.isPlaying()) {
$(this).html('play');
} else {
$(this).html('stop');
}
slideShow.togglePlayback();
});
// slideshow with callback
$('.callbackSlideShow').slideShow({
interval: 3,
slideClick: function(slideShow) {
if (slideShow.mouse.x > slideShow.options.slideSize.width / 2) {
slideShow.next();
} else {
slideShow.previous();
}
},
gotoSlide: function(slideShow, index) {
$('.callBackSlideShowLog').html('goto slide index: ' + index);
}
});
});
