init
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user