Update index.js

Removed logging
This commit is contained in:
Eliahu Horwitz 2023-02-02 19:30:34 +02:00 committed by GitHub
parent 57c68e6926
commit 98ef9cfbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,38 +9,13 @@ $(document).ready(function() {
slidesToShow: 1, slidesToShow: 1,
loop: true, loop: true,
infinite: true, infinite: true,
autoplay: false, autoplay: true,
autoplaySpeed: 3000, autoplaySpeed: 5000,
} }
// Initialize all div with carousel class // Initialize all div with carousel class
var carousels = bulmaCarousel.attach('.carousel', options); 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);
});
}
/*var 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(); bulmaSlider.attach();
}) })