Spaces:
Running
Running
File size: 1,550 Bytes
be068d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
window.HELP_IMPROVE_VIDEOJS = false;
$(document).ready(function() {
var options = {
slidesToScroll: 1,
slidesToShow: 3,
loop: true,
infinite: true,
autoplay: false,
autoplaySpeed: 3000,
}
// Initialize all div with carousel class
var carousels = bulmaCarousel.attach('.carousel', options);
// Loop on each carousel initialized
for(var i = 0; i < carousels.length; i++) {
// Add listener to event
carousels[i].on('before:show', state => {
console.log(state);
});
}
// Access to bulmaCarousel instance of an element
var element = document.querySelector('#my-element');
if (element && element.bulmaCarousel) {
// bulmaCarousel instance is available as element.bulmaCarousel
element.bulmaCarousel.on('before-show', function(state) {
console.log(state);
});
}
})
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll(".content").forEach(section => {
const tabs = section.querySelectorAll(".tabs li");
const contents = section.querySelectorAll(".video-content");
tabs.forEach(tab => {
tab.addEventListener("click", function () {
tabs.forEach(t => t.classList.remove("is-active"));
tab.classList.add("is-active");
const targetId = tab.getAttribute("data-target");
contents.forEach(c => c.classList.remove("is-active"));
const target = section.querySelector(`#${targetId}`);
if (target) target.classList.add("is-active");
});
});
});
});
|