Because recently developed projects involve HTML5 development on mobile devices, which requires a carousel effect. Then the quickest way, you know (Bootstrap), then the native Bootstrap carousel.js plugin does not support gestures.
And then...... Find your own way, and then, there are 3 solutions:
JQuery Mobile (http://jquerymobile.com/download/)
$ ("#carousel-generic"). Swipeleft (function() { $ (this). Carousel (' Next');}); $ ( "#carousel-generic"). Swiperight (function() { $ (this). Carousel (' prev ');});
TouchSwipe jQuery Plugin (https://github.com/mattbryson/TouchSwipe-Jquery-Plugin)
$ ("#carousel-generic"). Swipe ({ function() {$ (this). Carousel (' Next ');}, function() {$ (this). Carousel (' prev ');},});
Hammer.js (http://eightmedia.github.io/hammer.js/) +
Jquery.hammer.js (Https://github.com/EightMedia/jquery.hammer.js)
function () { $ (this). Carousel (' Next "); $ (function() { $(this ). Carousel (' prev ');});
Importing the entire jQuery Mobile just to support the swipe gesture seems a bit overqualified, (now it's out in the English language, downloadable)
The touchswipe on both sides of the button area can be clicked, and then the Hammer is selected.
English Original: http://lazcreative.com/blog/adding-swipe-support-to-bootstrap-carousel-3-0/
Original: Http://www.weste.net/2014/7-16/97866.html?utm_source=tuicool&utm_medium=referral
Three ways to let the bootstrap Carousel plugin Carousel support left and right swipe gestures