jquery swiper自定义pagination的方法
<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>
具体详情http://www.swiper.com.cn/api/pagination/2014/1217/70.html
ps:自定义classname方法
bulletClass: 'chanpin-bullet',
bulletActiveClass: 'chanpin-bullet-active',
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/18835.html