Add pause on :hover to carousel
Otherwise it goes by too fast without changing the speed option. Zurb Foundation has some nice carousel options to borrow from...
two similar google groups comments with similar requests:
http://groups.google.com/group/twitter-bootstrap/browse_thread/thread/9eeedbb0e68789e3/bf99468117bd669
http://groups.google.com/group/twitter-bootstrap/browse_thread/thread/21dda9f151f9f458/593cc7c9e9b09070
You can try:
$('#myCarousel').hover(
function() {
$(this).carousel('pause');
},
function() {
$(this).carousel('cycle');
}
);
This apparently works -- at least in Chrome 17.x which is the only thing I've tested in... Thank you, Tom
+1
I've noticed that this works on initial load, but if you use the left/right buttons, it doesn't seem to have any effect if you try to hover over the carousel area again. Thanks.
This actually solved the aforementioned issue for me (using mouseenter instead of hover):
$('.carousel').mouseenter(function() {
$(this).carousel('pause');
}).mouseleave(function() {
$(this).carousel('next');
});
Thanks!
Strange, hover is supposed be a wrapper function to mouseenter/mouseleave
added a pause on hover option to carousel in 2.0.2
Thanks for that!
I want to prevent from sliding on page load, and then when I hover carousel-indicators list item, It will show the hovered list item. How can I do that?
Hi @rjva , I'm afraid we can't answer these sorts of "how to" requests. I'd suggest trying on StackOverflow - see https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker