Is it possible to deactivate the plugin ‘bxSlider’ on mouseleave?
$('.post').mouseenter(function() {
$('.content .bxSlider').each(function(){
$(this).bxSlider({auto: 'true'});
});
}).mouseleave(function() {
// ??
});
Please advice…
Why do you want to stop it? Do you want it to auto-advance only while hovered?
Looking at the options I belive you can do this:
Naturally this code could be optimised a bit, maybe with some variables to reduce the number of dom searches, but I think this is what you’re after 🙂
EDIT
Right so the above doesn’t work. The public function isn’t recognised unless the slider object is a variable. I’m not sure why but here’s how I got around it:
And here it is working: http://jsfiddle.net/KBfx9/
Hope that helps!
EDIT 2
Solution for triggering nested slideshow:
The previous solution was to trigger multiple slideshows simultaneously. I have amended it here: http://jsfiddle.net/KBfx9/1/ to trigger the nested slideshow. Note: I’ve just use the class
.contentas my identifier instead of post because in my example the latter is unneeded. Additionally I’ve used the container’sindex()to identify the relevant slider since this will work in the page the OP has linked to (in the comments below).Hope this sorts it for you 🙂