//方法参数参考【有些不能用】 https://www.cnblogs.com/junhaoliu/p/6084281.html ;(function () { 'use strict'; var sliderMain = function() { $('.flexslider').flexslider({ animation: "fade",//淡入淡出 //animation: "slow",//左右切换 slideshowSpeed: 8000, //展示时间间隔ms animationSpeed: 500, //滚动时间ms,调整快慢原先400 touch: true, //是否支持触屏滑动 directionNav: true, //是否显示左右控制按钮 //auto: true, // add 当点击后不能自动播放,需要自动播放的 //animationLoop: true, //add 是否循环滚动 //pausePlay: true, //add 是否显示暂停播放按钮 pauseOnAction: false, //$$$ -> @@@强烈建议在与控件元素交互时暂停幻灯片放映【true 手动切换时永久暂停,除非重新加载页面】 slideshow: true, //载入页面时,是否自动播放 }); $('.newslider').flexslider({ animation: "fade", slideshowSpeed: 4000, //展示时间间隔ms animationSpeed: 400, //滚动时间ms touch: true, //是否支持触屏滑动 directionNav: true }); }; $(function(){ sliderMain(); }); }());