1jQuery(document).ready(function() { 2 3 var linksPDFnoCache = document.querySelectorAll('a[href*=".pdf"]'); 4 if(linksPDFnoCache.length > 0){ 5 linksPDFnoCache.forEach((link) => { 6 if(link){ 7 const timestamp = new Date().getTime(); 8 link.href=link.href+"?v="+timestamp; 9 } 10 }); 11 } 12 13 var linksGiostra = document.querySelectorAll("a[href^='https://www.mondainoeventi.it/source/giostra-teatrale']"); 14 15 if(linksGiostra){ 16 17 linksGiostra.forEach(linkGiostra => { 18 19 linkGiostra.addEventListener("click", () => { 20 21 console.log("click giostra"); 22 cms.facebook.event.track('track', 'Submit Application'); 23 24 }); 25 26 }); 27 28 29 } 30 31 32 33 jQuery(".cerca-btn").closest('form').on('submit', function(e) { e.preventDefault(); }); 34 35 jQuery(".cerca-btn").click(function(e) { 36 var input = jQuery(".cerca-input").val().trim().toLowerCase(); 37 38 if(jQuery('article.video').length > 0) { 39 searchInVideoGallery(input); 40 }else { 41 searchInFotoGallery(input); 42 } 43 44 }); 45 jQuery(".reset-btn").click(function(e) { 46 resetMasonryItems(); 47 resetInput(); 48 clearNotFoundMessage(); 49 initialiseMasonry(); 50 }); 51 52 jQuery(".cerca-input").keyup(function(event) { 53 if (event.keyCode === 13) { 54 jQuery(".cerca-btn").click(); 55 } 56 }); 57 58 function searchInFotoGallery(input) { 59 60 clearNotFoundMessage(); 61 resetMasonryItems(); 62 63 if(input) { 64 var found = false; 65 jQuery(".masonry .masonry-brick").each(function( index, value ) { 66 var description = value.children[1].textContent.toLowerCase(); 67 if (!description.includes(input)) { 68 jQuery(value).addClass("hide"); 69 } else { 70 found = true; 71 } 72 }); 73 74 if (!found) { 75 jQuery(".noresult").removeClass("hide"); 76 resetInput(); 77 } 78 } 79 80 initialiseMasonry(); 81 } 82 83 function searchInVideoGallery(input) { 84 85 clearNotFoundMessage(); 86 jQuery('article.video').removeClass('hide'); 87 88 if(input) { 89 var found = false; 90 jQuery('article.video').each(function( index, value ) { 91 92 var title = jQuery(value).find('.videoTitle').text().toLowerCase(); 93 var description = jQuery(value).find('.videoDescription').text().toLowerCase(); 94 95 if (!title.includes(input) && !description.includes(input)) { 96 jQuery(value).addClass("hide"); 97 } else { 98 found = true; 99 } 100 }); 101 102 if (!found) { 103 jQuery(".noresult").removeClass("hide"); 104 resetInput(); 105 } 106 } 107 } 108 109 function initialiseMasonry() { 110 var masonry = jQuery('.masonry').masonry({ 111 itemSelector: '.masonry-brick' 112 }); 113 masonry.masonry('layout'); 114 } 115 function resetMasonryItems() { 116 jQuery(".masonry .masonry-brick").each(function( index, value ) { 117 if (jQuery(value).hasClass("hide")) { 118 jQuery(value).removeClass("hide"); 119 } 120 }); 121 } 122 function resetInput() { 123 jQuery(".cerca-input").val("").focus(); 124 } 125 function clearNotFoundMessage() { 126 if (!jQuery(".noresult").hasClass("hide")) { 127 jQuery(".noresult").addClass("hide"); 128 } 129 } 130 131 132 133 134 // APertura menu secondo livello mobile // 135/* function openSecondLevel(){ 136 137 console.log('ciao'); 138 139 jQuery('.voce_menu_30381 > a').click(function(e){
140 console.log('ciao-2'); 141 e.preventDefault(); 142 jQuery(this).parents('li').children('#level2').addClass('slide-menu'); 143 144 }) 145 146 jQuery('.level2 li:first-child a').click(function(e){ 147 e.preventDefault(); 148 jQuery(this).parents('li').parents('#level2').removeClass('slide-menu'); 149 150 }) 151 } 152 153 154 jQuery(".level1 > li:has('.level2')").addClass('submenu'); 155 156 jQuery("li.submenu > a").removeAttr("href"); 157 158 if (window.innerWidth < 992) { 159 openSecondLevel(); 160 } */ 161 162}); 163 164function add_slide_menu(item) { 165 jQuery('li' + item + ' .level2').toggleClass('slide-menu'); 166} 167 168function back_menu(item) { 169 jQuery('li' + item + ' .level2').toggleClass('slide-menu'); 170} 171 172function goToByScroll(param){ 173 jQuery('html, body').animate({scrollTop: jQuery(param).offset().top-200}, 2000, "easeInOutQuad"); 174} 175
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.