nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions
https://swiperjs.com
MIT License
39.8k stars 9.75k forks source link

paginationBulletRender problem on version 3.4 #1903

Closed fabiosal closed 8 years ago

fabiosal commented 8 years ago

This is a (multiple allowed):

Upgrading to version 3.4 the function to customize paginations bullets does not work :

var swiper = new Swiper('.swiper-slider', {
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        spaceBetween: 30,
        autoplay: 8000,
        paginationType:'bullets',
        pagination: '.swiper-pagination',
        paginationClickable: true,
      paginationBulletRender: function (index, className) {
            return '<span class="' + className + '">' + (index + 1) + '</span>';
        }
}

Expected Behavior

the function should return 'swiper-pagination-bullet' as className and the index of each single slide

Actual Behavior

[object object ] is returned as index, and a number(the index?) as className

Tusko commented 8 years ago

thank you! it works ;)

But I have a problem with active pagination item. Thy to drag slides here https://arsmoon.com/ (pagination active class works only with first and last item)

MacBook Pro MacOS Sierra Google Chrome

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.