mirror of
https://github.com/OpenVGLab/OmniLottie.git
synced 2026-09-16 23:26:26 +00:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55 lines
1.6 KiB
JavaScript
55 lines
1.6 KiB
JavaScript
window.HELP_IMPROVE_VIDEOJS = false;
|
|
window.HELP_IMPROVE_VIDEOJS = false;
|
|
|
|
$(document).ready(function() {
|
|
// Check for click events on the navbar burger icon
|
|
$(".navbar-burger").click(function() {
|
|
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
|
$(".navbar-burger").toggleClass("is-active");
|
|
$(".navbar-menu").toggleClass("is-active");
|
|
|
|
});
|
|
|
|
let options = {
|
|
slidesToScroll: 1,
|
|
slidesToShow: 4,
|
|
loop: false,
|
|
infinite: false,
|
|
pagination: false,
|
|
autoplay: false,
|
|
autoplaySpeed: 3000,
|
|
}
|
|
|
|
// Initialize all div with carousel class
|
|
let carousels = bulmaCarousel.attach('.carousel', options);
|
|
|
|
// Loop on each carousel initialized
|
|
for(let 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
|
|
let 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);
|
|
});
|
|
}
|
|
|
|
/*
|
|
let player = document.getElementById('interpolation-video');
|
|
player.addEventListener('loadedmetadata', function() {
|
|
$('#interpolation-slider').on('input', function(event) {
|
|
console.log(this.value, player.duration);
|
|
player.currentTime = player.duration / 100 * this.value;
|
|
})
|
|
}, false);
|
|
*/
|
|
|
|
bulmaSlider.attach();
|
|
})
|