jfrosty jfrosty - 1 year ago 63
jQuery Question

How to disable carousel cycle, when user clicks indicators or carousel controls?

Using Bootstrap ready made carousel, I want to disable the automated cycle feature when the user clicks on the indicators or controls (next/prev buttons). So, if user clicks on the 'next' button, the carousel will now be manual. Not strong in jQuery, but this was my attempt.

$('#myCarousel').click(function() {

Answer Source

You can access the interval option via the carousel's .data() object, and set it to false..

$('#myCarousel').click(function() {

Demo: http://www.bootply.com/65091

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download