mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
767 B
JavaScript
31 lines
767 B
JavaScript
import {tns} from "tiny-slider/src/tiny-slider";
|
|
|
|
var sliderSimple ;
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
try {
|
|
document.querySelectorAll('.SliderSimple')?.forEach(function (el) {
|
|
if (el.classList.contains('.tns-slider')){
|
|
console.log('ignore');
|
|
return 'ignore';
|
|
}
|
|
sliderSimple = tns({
|
|
container: el,
|
|
items: 1,
|
|
autoplay: true,
|
|
autoplayButton: false,
|
|
// nextButton: false,
|
|
controls: false,
|
|
autoplayHoverPause: true,
|
|
mouseDrag: true,
|
|
slideBy: 1,
|
|
autoplayTimeout: 5000,
|
|
// speed:10000,
|
|
});
|
|
});
|
|
} catch {
|
|
}
|
|
|
|
|
|
});
|