1 2 3jQuery(window).resize(function () { 4 5 jQuery('.slick-gallery:eq(0)').css('width', +jQuery( window ).width()); 6 jQuery('.slick-gallery-autoheight:eq(0)').css('width', +jQuery( window ).width()); 7 8 jQuery('.slick-gallery:eq(0)').css('height',"-webkit-fill-available"); 9 jQuery('.slick-gallery-autoheight:eq(0)').css('height','auto'); 10 11 jQuery('.slick-gallery .slick-slide').each(function () { 12 jQuery(this).css('width', +jQuery( 'body' ).width()); 13 }); 14 15 jQuery('.slick-gallery-autoheight .slick-slide div div').each(function () { 16 jQuery(this).css('display', 'block'); 17 }); 18 jQuery('.slick-gallery .slick-slide img').each(function () { 19 jQuery(this).css('height', "-webkit-fill-available"); 20 jQuery(this).css('min-height', +window.innerHeight); 21 }); 22 23 24 jQuery('.slick-gallery-autoheight .slick-slide').each(function () { 25 jQuery(this).css('width', +jQuery( 'body' ).width()); 26 }); 27 jQuery('.slick-gallery-autoheight .slick-slide img').each(function () { 28 jQuery(this).css('height', "auto"); 29 }); 30 31 32 33 if(jQuery( window ).width()/jQuery( window ).height() <= 4/3){ 34 jQuery('.slick-gallery-autoheight:eq(0)').show(); 35 jQuery('.slick-gallery:eq(0)').hide(); 36 }else{ 37 38 jQuery('.slick-gallery-autoheight:eq(0)').show(); 39 jQuery('.slick-gallery:eq(0)').hide(); 40 // jQuery('.slick-gallery:eq(0)').show(); 41 // jQuery('.slick-gallery-autoheight:eq(0)').hide(); 42 } 43}); 44jQuery(document).ready(function(){ 45 46 var resize_slick_container = function () { 47 jQuery('.slick-gallery:eq(0)').css('width', +jQuery( window ).width()); 48 jQuery('.slick-gallery-autoheight:eq(0)').css('width', +jQuery( window ).width()); 49 50 jQuery('.slick-gallery:eq(0)').css('height',"-webkit-fill-available"); 51 jQuery('.slick-gallery-autoheight:eq(0)').css('height','auto'); 52 53 }; 54 55 jQuery("a[rel^='prettyPhoto']").click(function (e) { 56 e.preventDefault(); 57 58 jQuery('.slick-overlay:eq(0)').css('visibility', 'hidden'); 59 jQuery('.slick-overlay:eq(0)').css('opacity', '0'); 60 jQuery('.slick-overlay:eq(0)').show(); 61 62 resize_slick_container(); 63 $('.slick-gallery').slick('slickGoTo', jQuery("a[rel^='prettyPhoto']").index(this)); 64 65 66 jQuery('.slick-overlay:eq(0)').css('visibility', 'visible'); 67 jQuery('.slick-overlay:eq(0)').css('opacity', '1'); 68 jQuery('.slick-overlay:eq(0)').hide(); 69 jQuery('.slick-overlay:eq(0)').show('fast', 'linear'); 70 jQuery('.slick-gallery:eq(0)').css('width', +jQuery( window ).width()); 71 jQuery('.slick-gallery-autoheight:eq(0)').css('width', +jQuery( window ).width()); 72 73 jQuery('.slick-gallery:eq(0)').css('height',"-webkit-fill-available"); 74 jQuery('.slick-gallery-autoheight:eq(0)').css('height','auto'); 75 76 jQuery('.slick-gallery .slick-slide').each(function () { 77 jQuery(this).css('width', +jQuery( 'body' ).width()); 78 }); 79 jQuery('.slick-gallery-autoheight .slick-slide div div').each(function () { 80 jQuery(this).css('display', 'block'); 81 }); 82 jQuery('.slick-gallery .slick-slide img').each(function () { 83 jQuery(this).css('height', "-webkit-fill-available" ); 84 jQuery(this).css('min-height', +window.innerHeight); 85 }); 86 87 88 jQuery('.slick-gallery-autoheight .slick-slide').each(function () { 89 jQuery(this).css('width', +jQuery( 'body' ).width()); 90 }); 91 jQuery('.slick-gallery-autoheight .slick-slide img').each(function () { 92 jQuery(this).css('height', "auto"); 93 }); 94 95 96 if(window.innerWidth/window.innerHeight < 4/3 ){ 97 jQuery('.slick-gallery-autoheight:eq(0)').show(); 98 jQuery('.slick-gallery:eq(0)').hide(); 99 }else{ 100 101 jQuery('.slick-gallery-autoheight:eq(0)').show(); 102 jQuery('.slick-gallery:eq(0)').hide(); 103 // jQuery('.slick-gallery:eq(0)').show(); 104 // jQuery('.slick-gallery-autoheight:eq(0)').hide(); 105 } 106 }); 107 108 jQuery('.slick-overlay:eq(0)').hide(); 109 110 var html = ""; 111 112 jQuery('a[rel="prettyPhoto[gallery]"]').each(function(){ 113 html += "<div><img style='width: 100%;' data-lazy='" + $(this).attr('href') + "'/>"; 114 if($(this).attr('title') != '' && $(this).attr('title')!= undefined){ 115 html += "<div class='img-desc'><span>" + $(this).attr('title') + "</span></div>"; 116 } 117 118 html += "</div>"; 119 }); 120 121 jQuery('.slick-gallery:eq(0)').html(html); 122 jQuery('.slick-gallery-autoheight:eq(0)').html(html); 123 124 resize_slick_container(); 125 jQuery('.slick-gallery').on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){ 126 var i = (currentSlide ? currentSlide : 0) + 1; 127 jQuery('.current-slide-text').text(i + '/' + slick.slideCount); 128 }); 129 130 131 jQuery('.slick-gallery').slick({ 132 infinite: true, 133 speed: 400, 134 fade: false, 135 variableWidth: true, 136 variableHeight: true, 137 lazyLoad: 'progressive', 138 asNavFor: '.slick-gallery-autoheight', 139 cssEase: 'linear' 140 }); 141 jQuery('.slick-gallery-autoheight').slick({ 142 infinite: true, 143 speed: 400, 144 fade: false, 145 variableWidth: true, 146 variableHeight: true, 147 lazyLoad: 'progressive', 148 asNavFor: '.slick-gallery', 149 cssEase: 'linear' 150 }); 151 152 153 jQuery('.close-gallery-button').on("click", function () { 154 jQuery('.slick-overlay:eq(0)').hide('fast', 'linear'); 155 }); 156 157 158 159});
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.