23 lines
529 B
JavaScript
23 lines
529 B
JavaScript
define([
|
|
'Swiper'
|
|
], function (Swiper) {
|
|
'use strict';
|
|
|
|
return function (config, element) {
|
|
if (element.getAttribute('data-has-pagination') !== 'true') {
|
|
return;
|
|
}
|
|
|
|
new Swiper(element, {
|
|
autoHeight: true,
|
|
allowTouchMove: true,
|
|
observer: true,
|
|
observeParents: true,
|
|
pagination: {
|
|
el: element.querySelector('.esun-hot-sale__pagination'),
|
|
clickable: true
|
|
}
|
|
});
|
|
};
|
|
});
|