I have two sliders. Necessary that they stopped at the same time, when hover on some of them. My code:
$('.slider').anythingSlider({
autoPlay : true,
delay : 1000,
autoPlayLocked : true,
infiniteSlides : false,
stopAtEnd : false,
onShowUnpause : function(e, slider){
$('.slider').each(function() {
$(this).data('AnythingSlider').startStop();
});
},
onShowPause: function(e, slider){
$('.slider').each(function() {
$(this).data('AnythingSlider').startStop(false);
});
}
});
But this not working
When using the
startStop()
function, it actually completely stops the slideshow, so theonShowUnpause
function will never fire. Try this instead (demo):