P
P
Pipop2020-04-23 19:19:25
css
Pipop, 2020-04-23 19:19:25

How to change factional pagination in sweeper?

Default delimiter character is / : https://swiperjs.com/demos/060-pagination-fraction.html Can it be changed to a dash?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
archelon, 2020-04-23
@Pipop

In the documentation https://swiperjs.com/api/#pagination
the renderFraction parameter

var swiper = new Swiper('.swiper-container', {
  //...
  renderFraction: function (currentClass, totalClass) {
      return '<span class="' + currentClass + '"></span>' +
              ' of ' +
              '<span class="' + totalClass + '"></span>';
  }
});

in the example -  of(1 of 10)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question