1$(document).ready(function () { 2 $("[open-modal]").click(function () { 3 const modal = $(this).data("modal-id"); 4 if (modal == "#gallery_modal") renderImagesToSlider($(this)); 5 openModal(modal); //send modal to open modal function 6 }); 7 8 $("[close-modal]").click(function () { 9 $modal = $(this).data("modal-id"); 10 $($modal).removeClass("active"); // close modal 11 }); 12 13 function openModal(modal) { 14 $(modal).addClass("active"); // open modal 15 } 16}); 17$(document).on('keydown', function(e) { 18 if (e.keyCode == 27){ 19 $('.modal').removeClass('active'); 20 } 21}); 22 23function renderImagesToSlider(el) { 24 const RTL = $("body").hasClass("rtl"); 25 const data = el.data("array"); 26 const modalSlider = $("#gallery_modal .modal-slider"); 27 //console.log(data); 28 if (modalSlider.hasClass('slick-initialized')) { 29 modalSlider.slick('destroy'); 30 } 31 modalSlider.html(""); 32 modalSlider.append(data.map((d) => `<img src="${d.href}" alt="${d.title}">`)); 33 modalSlider.slick({ 34 slidesToShow: 1, 35 arrows: true, 36 slidesToScroll: 1, 37 autoplay: false, 38 autoplaySpeed: 3000, 39 dots: false, 40 rtl: RTL, 41 prevArrow: `<button class="f-center" type="button"> › </button>`, 42 nextArrow: `<button class="f-center" type="button"> ‹ </button>`, 43 appendArrows: $(".modal-slider-arrows"), 44 }); 45} 46
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.