jquery swiper自定义pagination的方法
jquery swiper自定义pagination的方法
<pre>
<script>
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
paginationClickable: true,
paginationBulletRender: function (swiper, index, className) {
return '<span class="' + className + '">' + (index + 1) + '</span>';
}
});
</script>
</pre>
具体详情http://www.swiper.com.cn/api/pagination/2014/1217/70.html
ps:自定义classname方法
<pre>
bulletClass: 'chanpin-bullet',
bulletActiveClass: 'chanpin-bullet-active',
</pre>
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/