Is it possible to prevent the Bootstrap carousel pause on mouse hover behaviour and continue automatically cycling through the items instead?
The documentation only mentions the default behaviour of pause: "hover"
, if I change the pause argument to anything else then the carousel stops working altogether so I'm not sure how to disable this default behaviour.
Use the [interval]="'0'" input. This will disable the auto-sliding feature. Here's the link to the Carousel Documentation.
To turn off the autoplay set data-mdb-interval="false" next to a . carousel .
We can set the function pause using data-pause="Hover", pause function makes the sliding images stop when the hover is placed on the images.
The transition duration of . carousel-item can be changed with the $carousel-transition-duration Sass variable before compiling or custom styles if you're using the compiled CSS. If multiple transitions are applied, make sure the transform transition is defined first (eg. transition: transform 2s ease, opacity .
I've found that a value of "false"
will cause the carousel to keep cycling during a mouseover:
$('.carousel').carousel({ pause: "false" });
I am using Twitter Bootstrap v2.0.2
You can add this to the div .carousel too instead of using javascript.
Add delay time:
data-interval="3000"
Add if it pauses on hover or not, options are true
and false
data-pause="false"
Example would be:
<div id="carousel" class="carousel" data-ride="carousel" data-interval="3000" data-pause="false">
This worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With