1、HTML
<div class="carousel" id="carousel-default"> <ul> <li><span>1</span></li> <li><span>2</span></li> <li><span>3</span></li> <li><span>4</span></li> <li><span>5</span></li> <li><span>6</span></li> <li><span>7</span></li> <li><span>8</span></li> <li><span>9</span></li> <li><span>10</span></li> </ul> </div>
2、使用默认设置初始化
$('#carousel-default').floatingCarousel();
3、自适应轮播创建
var opts = { // options here }, responsiveCarousel = $('#carousel-default').floatingCarousel(opts); $(window).resize($.debounce(100, function () { responsiveCarousel.update(opts); }));
4、所有配置选项
$('#carousel-default').floatingCarousel({ // auto scroll autoScroll : false, // or 'right' autoScrollDirection : 'left', // scroll speed in milliseconds autoScrollSpeed : 10000, // initial CSS class initClass: 'floatingCarouselContainer', // infinite loop looped : true, // or 'vertical' scrollerAlignment : 'horizontal', // scroll offset in pixels scrollerOffset : 0, // or 'slow', 'fast' scrollSpeed : 'medium', // enable touch events enableTouchEvents : true, // prevent unwanted page scrolling during touch events touchOverflowHidden : true, // reverse the the direction on touch reverseOnTouch : true });
5、回调函数
$('#carousel-default').floatingCarousel({ beforeCreateFunction : null, afterCreateFunction : null });
怎么不能下载