Skip to content

Commit

Permalink
feat(pagination): allow multiple clickableClass
Browse files Browse the repository at this point in the history
fixes #6741
  • Loading branch information
nolimits4web committed Aug 9, 2023
1 parent 220baaa commit 703d13b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/pagination/pagination.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export default function Pagination({ swiper, extendParams, on, emit }) {
el = makeElementsArray(el);
el.forEach((subEl) => {
if (params.type === 'bullets' && params.clickable) {
subEl.classList.add(params.clickableClass);
subEl.classList.add(...(params.clickableClass || '').split(' '));
}

subEl.classList.add(params.modifierClass + params.type);
Expand Down Expand Up @@ -414,6 +414,7 @@ export default function Pagination({ swiper, extendParams, on, emit }) {
swiper.isHorizontal() ? params.horizontalClass : params.verticalClass,
);
if (params.clickable) {
subEl.classList.remove(...(params.clickableClass || '').split(' '));
subEl.removeEventListener('click', onBulletClick);
}
});
Expand Down

0 comments on commit 703d13b

Please sign in to comment.