超漂亮的jQuery图片轮播特效
作者:bea
超漂亮的jQuery图片轮播特效,使用了插件jCarousel,很棒的jQuery插件,支持带缩略图左右切换,支持Ajax加载数据,响应式布局,支持移动端触屏,强大的API参数配置功能以及函数回调功能,支持自定义动画速度和动画模式,支持轮播方向定义,还是很不错的,推荐学习和使用。 使用方法: 1.加载jQuery和插件 <link rel="stylesheet" type="text/css" href="jcarousel.basic.css"><
超漂亮的jQuery图片轮播特效,使用了插件jCarousel,很棒的jQuery插件,支持带缩略图左右切换,支持Ajax加载数据,响应式布局,支持移动端触屏,强大的API参数配置功能以及函数回调功能,支持自定义动画速度和动画模式,支持轮播方向定义,还是很不错的,推荐学习和使用。
使用方法: 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内容
<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">‹</a>
<a href="#" class="jcarousel-control-next">›</a>
<p class="jcarousel-pagination">
</p>
</div>
3.函数调用
<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图片轮播特效的关键代码,大家还需要进一步的完善,可以结合之前的文章进行学习,一定会有意想不到的收获。
有用 | 无用
使用方法: 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内容
<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">‹</a>
<a href="#" class="jcarousel-control-next">›</a>
<p class="jcarousel-pagination">
</p>
</div>
3.函数调用
<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图片轮播特效的关键代码,大家还需要进一步的完善,可以结合之前的文章进行学习,一定会有意想不到的收获。
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- jquery利用拖拽方式在图片上添加热链接
- jquery中checkbox使用方法简单实例演示
- 基于Jquery和CSS3制作数字时钟附源码下载(CSS3篇)
- 基于jQuery和CSS3制作数字时钟附源码下载(jquery篇)
- 基于jquery实现简单的手风琴特效
- jQuery插件实现无缝滚动特效
- Jquery ajax加载等待执行结束再继续执行下面代码操作
- 谈谈encodeURI和encodeURIComponent以及escape的区别与应用
- javascript实现加载xml文件的方法
- jQuery 1.9.1源码分析系列(十)事件系统之主动触发事件和模拟冒泡处理
- JavaScript转换与解析JSON方法实例详解
- jQuery实现带分组数据的Table表头排序实例分析
- JS数组排序技巧汇总(冒泡、sort、快速、希尔等排序)
- JS获取数组最大值、最小值及长度的方法
- 基于jquery实现日历签到功能
- Jquery1.9.1源码分析系列(六)延时对象应用之jQuery.ready
- 如何解决ligerUI布局时Center中的Tab高度大小
- JS实现图片高亮展示效果实例
- JS截取字符串实例详解