javascript - Bootstrap Carousel bug -


so have simple carousel made on bootstrap , want when enter carousel slide stop. works when mouse enters problem happens. div has disappear doesn't slide disappears

<script> $(document).ready(function() {     $('#mycarousel').carousel({interval: 1000})     .on('slid', function (e) { $(this).carousel({interval:false}); }); }); </script> 

example: http://jsfiddle.net/ferkp/

after bit of research, seems a known bug in bootstrap 2.x.

by upgrading bootstrap 3.0, appearance of carousel gets changed, bug fixed. can grab css , js cdn:

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> 

oh, , might still want include result other answer (that's deleted, seems) , change $(this).carousel({ interval: false }); $(this).carousel('pause');, otherwise piece of code doesn't anything.

and if upgrading bootstrap 3.0 isn't option reason, there's method provided on bug report page edit bootstrap javascript fix bug in 2.x.

jsfiddle demo


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -