1.下载滑动手势js插件:hammer.js
///hammer.js/2.0.8/hammer.min.js
2.写一个javascript命令调用hammer.js中的swipe功能
<script>$(function(){//添加移动端滑动var myElement= document.getElementById('myCarousel')//id为轮播的idvar hm=new Hammer(myElement);hm.on("swipeleft",function(){$('#myCarousel').carousel('next')})hm.on("swiperight",function(){$('#myCarousel').carousel('prev')})})</script>