1window.HELP_IMPROVE_VIDEOJS = false; 2 3 4$(document).ready(function () { 5 // Check for click events on the navbar burger icon 6 7 var options = { 8 slidesToScroll: 1, 9 slidesToShow: 2, 10 infinite: true, 11 autoplay: true, 12 autoplaySpeed: 5000, 13 pagination: false, 14 } 15 16 // Initialize all div with carousel class 17 bulmaCarousel.attach('.carousel', options); 18}) 19 20document.addEventListener('DOMContentLoaded', () => { 21 // Functions to open and close a modal 22 function openModal($el) { 23 $el.classList.add('is-active'); 24 } 25 26 function closeModal($el) { 27 $el.classList.remove('is-active'); 28 } 29 30 function closeAllModals() { 31 (document.querySelectorAll('.modal') || []).forEach(($modal) => { 32 closeModal($modal); 33 }); 34 } 35 36 // Add a click event on buttons to open a specific modal 37 (document.querySelectorAll('.js-modal-trigger') || []).forEach(($trigger) => { 38 const modal = $trigger.dataset.target; 39 const $target = document.getElementById(modal); 40 41 $trigger.addEventListener('click', () => { 42 openModal($target); 43 }); 44 }); 45 46 // Add a click event on various child elements to close the parent modal 47 (document.querySelectorAll('.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button') || []).forEach(($close) => { 48 const $target = $close.closest('.modal'); 49 50 $close.addEventListener('click', () => { 51 closeModal($target); 52 }); 53 }); 54 55 // Add a keyboard event to close all modals 56 document.addEventListener('keydown', (event) => { 57 if (event.code === 'Escape') { 58 closeAllModals(); 59 } 60 }); 61});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.