vmems-website/themes/vmems-theme/static/js/main.js

14 lines
359 B
JavaScript
Raw Normal View History

document.addEventListener('DOMContentLoaded',function(){
if($('.carousel').length>1){
$('.carousel').each(i=>{
let toslick = $(i).attr('data-to-slick')
console.log(toslick)
$(i).slick(JSON.parse(toslick));
});
}else{
let toslick = $('.carousel').attr('data-to-slick')
console.log(toslick)
$('.carousel').slick(JSON.parse(toslick));
}
})