1var $jQLightbox = jQuery.noConflict(); 2 3$jQLightbox(function(){ 4 5 InitLightBox(); 6 7}); 8 9 10function InitLightBox() 11 { 12 $jQLightbox("label[for^='image']").unbind("click"); 13 14 $jQLightbox("label[for^='image']").click(function() { 15 16 var identificatore=$jQLightbox(this).attr('for'); 17 var array1=identificatore.split('image'); 18 var array2=array1[1].split('-'); 19 //alert('tipo:'+array2[0]+' | id:'+array2[1]); tipo: fotogallery/pagina3000 | id: 1 20 21 var elemento=array2[0]+'-'+array2[1]; 22 23 if(array2[2] !== 'undefined' && array2[2] !== undefined && array2[2] !== '') elemento=array2[0]+'-'+array2[1]+'-'+array2[2]; 24 25 //console.log(elemento); 26 27 var maxelement=Number($jQLightbox("#lb-maxelement"+array2[0]).attr('data-maxelement')); 28 29 //cerco i vari elementi 30 var pathfoto=$jQLightbox("#dati"+elemento).attr('data-pathfoto'); 31 var srcset=$jQLightbox("#dati"+elemento).attr('data-srcset'); 32 var sizes=$jQLightbox("#dati"+elemento).attr('data-sizes'); 33 var width=$jQLightbox("#dati"+elemento).attr('data-width'); 34 var height=$jQLightbox("#dati"+elemento).attr('data-height'); 35 var alt=$jQLightbox("#dati"+elemento).attr('data-alt'); 36 var title=$jQLightbox("#dati"+elemento).attr('data-title'); 37 var didascalia=$jQLightbox("#dati"+elemento).attr('data-didascalia'); 38 39 $jQLightbox(".lb-overlay img").attr("src",pathfoto); 40 $jQLightbox(".lb-overlay img").attr("srcset",srcset); 41 $jQLightbox(".lb-overlay img").attr("sizes",sizes); 42 //$jQLightbox(".lb-overlay img").attr("width",width); 43 //$jQLightbox(".lb-overlay img").attr("height",height); 44 $jQLightbox(".lb-overlay img").attr("alt",alt); 45 $jQLightbox(".lb-overlay img").attr("title",title); 46 $jQLightbox(".lb-overlay .lb-didascalia").html(didascalia); 47 48 //nuovo id next e prev 49 var id_next=Number(array2[1])+1; 50 var id_prev=Number(array2[1])-1; 51 52 53 if(id_prev>0) 54 { 55 if(array2[2]!='') id_prev=id_prev+'-'+array2[2]; 56 57 $jQLightbox('.lb-prev').css({"display":"flex"}); 58 $jQLightbox('.lb-prev').closest('label').attr('for', 'image'+array2[0]+'-'+id_prev); 59 } 60 else 61 { 62 $jQLightbox('.lb-prev').css({"display":"none"}); 63 } 64 65 if(id_next<=maxelement) 66 { 67 if(array2[2]!='') id_next=id_next+'-'+array2[2]; 68 69 $jQLightbox('.lb-next').css({"display":"flex"}); 70 $jQLightbox('.lb-next').closest('label').attr('for', 'image'+array2[0]+'-'+id_next); 71 } 72 else 73 { 74 $jQLightbox('.lb-next').css({"display":"none"}); 75 } 76 77 $jQLightbox("#overlayimage"+array2[0]+".lb-overlay").css({"display":"block"}); 78 79 }); 80 81 $jQLightbox(".lb-overlay").click(function(e) { 82 83 if ($jQLightbox(e.target).closest('.lb-contenitoreimmagine').length === 0) 84 { 85 $jQLightbox(".lb-overlay").css({"display":"none"}); 86 } 87 88 }); 89 90 91 //press key avanti indietro 92 $jQLightbox(document).keydown(function(event){ 93 94 var visibile = $jQLightbox('.lb-overlay:visible'); 95 var idVisibile = visibile.attr('id'); 96 //console.log("Elemento visibile:", idVisibile); 97 98 if (event.keyCode == 37) 99 { 100 //console.log("Indietro"); 101 $jQLightbox('#'+idVisibile+' .lb-prev').closest('label').trigger('click'); 102 } 103 104 if (event.keyCode == 39) 105 { 106 //console.log("Avanti"); 107 $jQLightbox('#'+idVisibile+' .lb-next').closest('label').trigger('click'); 108 } 109 110 }); 111 112 113 $jQLightbox(".lb-gallery-slide-freccia").click(function (e) 114 { 115 var Hchiuso=$jQLightbox( ".lb-gallery-slide").attr("data-Hchiuso"); 116 console.log(Hchiuso); 117 if ($jQLightbox( ".lb-gallery-slide-freccia").html()=="keyboard_arrow_down") 118 { 119 $jQLightbox( ".lb-gallery-slide").css({"height":"auto"}); 120 $jQLightbox( ".lb-gallery-slide-freccia").html("keyboard_arrow_up"); 121 } 122 else 123 {
124 $jQLightbox( ".lb-gallery-slide").css({"height":Hchiuso}); 125 $jQLightbox( ".lb-gallery-slide-freccia").html("keyboard_arrow_down"); 126 } 127 }); 128 }
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.