最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

超漂亮的jQuery圖片輪播特效

 更新時(shí)間:2015年11月24日 11:00:39   投稿:lijiao  
這篇文章為大家分享了超漂亮的jQuery圖片輪播特效,支持Ajax加載數(shù)據(jù),響應(yīng)式布局,支持移動(dòng)端觸屏,功能強(qiáng)大,感興趣的小伙伴們可以參考一下

超漂亮的jQuery圖片輪播特效,使用了插件jCarousel,很棒的jQuery插件,支持帶縮略圖左右切換,支持Ajax加載數(shù)據(jù),響應(yīng)式布局,支持移動(dòng)端觸屏,強(qiáng)大的API參數(shù)配置功能以及函數(shù)回調(diào)功能,支持自定義動(dòng)畫(huà)速度和動(dòng)畫(huà)模式,支持輪播方向定義,還是很不錯(cuò)的,推薦學(xué)習(xí)和使用。

使用方法:
1.加載jQuery和插件

<link rel="stylesheet" type="text/css" href="jcarousel.basic.css">
<script type="text/javascript" src="libs/jquery/jquery.js"></script>
<script type="text/javascript" src="dist/jquery.jcarousel.min.js"></script>

2.HTML內(nèi)容

<div class="jcarousel-wrapper">
<div class="jcarousel">
 <ul>
 <li><img src="../_shared/img/img1.jpg" width="600" height="400" alt=""></li>
 <li><img src="../_shared/img/img2.jpg" width="600" height="400" alt=""></li>
 <li><img src="../_shared/img/img3.jpg" width="600" height="400" alt=""></li>
 <li><img src="../_shared/img/img4.jpg" width="600" height="400" alt=""></li>
 <li><img src="../_shared/img/img5.jpg" width="600" height="400" alt=""></li>
 <li><img src="../_shared/img/img6.jpg" width="600" height="400" alt=""></li>
 </ul>
</div>
<a href="#" class="jcarousel-control-prev">&lsaquo;</a>
<a href="#" class="jcarousel-control-next">&rsaquo;</a>
<p class="jcarousel-pagination">
</p>
</div>

3.函數(shù)調(diào)用

 <script type="text/javascript">
 $(function(){
   $('.jcarousel').jcarousel(); 
     $('.jcarousel-control-prev')
       .on('jcarouselcontrol:active', function() {
         $(this).removeClass('inactive');

       })
       .on('jcarouselcontrol:inactive', function() {
         $(this).addClass('inactive');

       })
       .jcarouselControl({
         target: '-=1'
       });
     $('.jcarousel-control-next')
       .on('jcarouselcontrol:active', function() {

         $(this).removeClass('inactive');

       })
       .on('jcarouselcontrol:inactive', function() {
         $(this).addClass('inactive');
       })
       .jcarouselControl({
         target: '+=1'
      });
 
     $('.jcarousel-pagination')
        .on('jcarouselpagination:active', 'a', function() {
        $(this).addClass('active');
       })
       .on('jcarouselpagination:inactive', 'a', function() {
         $(this).removeClass('active');
      })
       .jcarouselPagination();
   });
 });

以上就是為大家推薦的jQuery圖片輪播特效的關(guān)鍵代碼,大家還需要進(jìn)一步的完善,可以結(jié)合之前的文章進(jìn)行學(xué)習(xí),一定會(huì)有意想不到的收獲。

相關(guān)文章

最新評(píng)論

伊吾县| 凤阳县| 南投县| 霞浦县| 织金县| 永德县| 望谟县| 宽甸| 昌宁县| 信宜市| 大同县| 广州市| 石楼县| 常熟市| 沙坪坝区| 屏边| 宁陕县| 扎赉特旗| 新泰市| 甘洛县| 洱源县| 伊通| 英吉沙县| 大名县| 牙克石市| 卫辉市| 哈尔滨市| 枣强县| 平武县| 云和县| 荆门市| 安乡县| 安西县| 郯城县| 正阳县| 达尔| 萍乡市| 疏勒县| 西华县| 马鞍山市| 辰溪县|