1$(function(){ 2 3 $('body:not(.ippedit) .widget_gallery01.add_design1 .wrapper_item, body:not(.ippedit) .widget_gallery01.add_design5 .wrapper_item, body:not(.ippedit) .block_news_1.add_design14 .content_wrapper ul').slick({ 4 autoplay: true, 5 autoplaySpeed: 3000, 6 speed: 400, 7 cssEase: 'ease-in-out', 8 slidesToShow: 4, 9 slidesToScroll: 1, 10 responsive: [ 11 { 12 breakpoint: 800, 13 settings: { 14 slidesToShow: 3, 15 } 16 }, 17 { 18 breakpoint: 500, 19 settings: { 20 slidesToShow: 2, 21 } 22 }, 23 ] 24 }); 25 26 $('body.ippedit .widget_gallery01.add_design1 .wrapper_item, body.ippedit .widget_gallery01.add_design5 .wrapper_item, body.ippedit .block_news_1.add_design14 .content_wrapper ul').slick({ 27 speed: 400, 28 pauseOnHover: true, 29 cssEase: 'ease-in-out', 30 slidesToShow: 4, 31 slidesToScroll: 1, 32 responsive: [ 33 { 34 breakpoint: 800, 35 settings: { 36 slidesToShow: 3, 37 } 38 }, 39 { 40 breakpoint: 500, 41 settings: { 42 slidesToShow: 2, 43 } 44 }, 45 ] 46 }); 47 48 if ($('body:not(.ippedit) .gallery_single, .gallery_single.slide_single').length){ 49 $('.gallery_single_slider').each(function(){ 50 var $gallery_single_slider = $(this); 51 var $gallery_single_slider_thum = $(this).next('.gallery_single_slider_thum'); 52 var data_column = Number($gallery_single_slider.attr('data-column')); 53 if($gallery_single_slider.hasClass('no_thum')){ 54 $gallery_single_slider_thum.remove(); 55 }else{ 56 $gallery_single_slider_thum.append($gallery_single_slider.contents().clone()); 57 /* 58 ãµã ãvideoâimgï¼posterï¼ç½®æ 59 $gallery_single_slider_thum.find('video[poster]').parents('.video').each(function(){ 60 var src = $(this).find('video').attr('poster'); 61 $(this).replaceWith('<img src="'+src+'" alt="">'); 62 }); 63 */ 64 } 65 var set_autoplay = true; 66 var set_rtl = false; 67 var set_centerMode = false; 68 if(data_column < $gallery_single_slider.find('.inner_item ').length){ 69 var set_centerMode = true; 70 } 71 if($gallery_single_slider.parents('.gallery_single').hasClass('notplay')){ 72 set_autoplay = false; 73 } 74 if($gallery_single_slider.parents('.gallery_single').hasClass('rtl')){ 75 set_rtl = true; 76 } 77 if(data_column > 3){ 78 //4-6 79 $gallery_single_slider.slick({ 80 autoplay: set_autoplay, 81 speed: 400, 82 cssEase: 'ease-in-out', 83 dotsClass: 'pointer', 84 draggable: true, 85 arrows: false, 86 fade: false, 87 slidesToShow: data_column, 88 slidesToScroll: 1, 89 //centerMode: set_centerMode, 90 centerMode: false, 91 centerPadding: '0px', 92 infinite: true, 93 swipe: true, 94 dots: true, 95 infinite: set_autoplay, 96 rtl: set_rtl, 97 asNavFor: $gallery_single_slider_thum, 98 responsive: [ 99 { 100 breakpoint: 900, 101 settings: { 102 slidesToShow: 4, 103 } 104 }, 105 { 106 breakpoint: 600, 107 settings: { 108 slidesToShow: 2, 109 } 110 }, 111 { 112 breakpoint: 450, 113 settings: { 114 slidesToShow: 1, 115 //adaptiveHeight: true, 116 } 117 }, 118 ], 119 }); 120 //$gallery_single_slider.slick('slickSetOption', 'slidesToScroll', Math.floor(10/data_column), true); 121 }else if(data_column > 1){ 122 //2-3 123 $gallery_single_slider.slick({ 124 autoplay: set_autoplay, 125 speed: 400, 126 cssEase: 'ease-in-out', 127 dotsClass: 'pointer', 128 draggable: true, 129 arrows: false, 130 fade: false, 131 slidesToShow: data_column, 132 slidesToScroll: 1, 133 centerMode: true, 134 centerPadding: '0px', 135 swipe: true, 136 dots: true, 137 infinite: set_autoplay, 138 rtl: set_rtl, 139 asNavFor: $gallery_single_slider_thum, 140 responsive: [ 141 { 142 breakpoint: 600, 143 settings: { 144 slidesToShow: 2, 145 } 146 }, 147 { 148 breakpoint: 450, 149 settings: { 150 slidesToShow: 1, 151 //adaptiveHeight: true, 152 } 153 }, 154 ], 155 }); 156 }else{ 157 //1 158 $gallery_single_slider.slick({ 159 autoplay: set_autoplay, 160 speed: 400, 161 cssEase: 'ease-in-out', 162 dotsClass: 'pointer', 163 draggable: false, 164 arrows: true, 165 fade: true, 166 slidesToShow: 1, 167 slidesToScroll: 1, 168 swipe: false, 169 dots: true, 170 infinite: set_autoplay, 171 rtl: set_rtl, 172 asNavFor: $gallery_single_slider_thum, 173 responsive: [ 174 { 175 breakpoint: 600, 176 settings: { 177 draggable: true, 178 swipe: true, 179 fade: false, 180 } 181 }, 182 { 183 breakpoint: 450, 184 settings: { 185 draggable: true, 186 swipe: true, 187 fade: false, 188 //adaptiveHeight: true, 189 } 190 }, 191 ], 192 }); 193 } 194 if($gallery_single_slider.find('.slick-slide').length <= 1){ 195 $gallery_single_slider_thum.remove(); 196 }else{ 197 $gallery_single_slider_thum.slick({ 198 speed: 400, 199 cssEase: 'ease-in-out', 200 draggable: false,
201 arrows: false, 202 infinite: false, 203 slidesToShow: 1, 204 slidesToScroll: 1, 205 swipe: false, 206 focusOnSelect: true, 207 asNavFor: $(this), 208 }); 209 $gallery_single_slider_thum.find('a img').unwrap(); 210 $gallery_single_slider_thum.find('video').removeAttr('controls autoplay'); 211 $gallery_single_slider_thum.find('video').each(function(){ 212 if($(this).height() >= $(this).width()){ 213 $(this).addClass('thum_vertical'); 214 }else{ 215 $(this).addClass('thum_horizontal'); 216 } 217 }); 218 } 219 220 /*-----*/ 221 222 //var videoStatus = 'waiting'; 223 var videoStatus = 'play'; 224 function CheckVideo(){ 225 $gallery_single_slider.find('.slick-slide video').each(function(){ 226 var $video = $(this)[0]; 227 if(videoStatus == 'paused'){ 228 }else{ 229 $video.pause(); 230 } 231 $video.currentTime = 0; 232 }); 233 if($gallery_single_slider.find('.slick-current video').length){ 234 var $video = $gallery_single_slider.find('.slick-current video')[0]; 235 if(videoStatus == 'play'){ 236 if(set_autoplay == true){ 237 $gallery_single_slider.slick('slickPause'); 238 } 239 $video.play(); 240 videoStatus = 'play'; 241 }else if(videoStatus == 'pause'){ 242 if(set_autoplay == true){ 243 $gallery_single_slider.slick('slickPause'); 244 } 245 $video.play(); 246 videoStatus = 'play'; 247 }else if(videoStatus == 'paused'){ 248 if(set_autoplay == true){ 249 $gallery_single_slider.slick('slickPlay'); 250 } 251 videoStatus = 'pause'; 252 }else if(videoStatus == 'ended'){ 253 if(set_autoplay == true){ 254 $gallery_single_slider.slick('slickPause'); 255 } 256 $video.play(); 257 videoStatus = 'play'; 258 }else if(videoStatus == 'waiting'){ 259 if(set_autoplay == true){ 260 $gallery_single_slider.slick('slickPlay'); 261 } 262 videoStatus = 'waiting'; 263 } 264 265 $video.addEventListener('play', function(){ 266 if(set_autoplay == true){ 267 $gallery_single_slider.slick('slickPause'); 268 } 269 videoStatus = 'play'; 270 }, false); 271 $video.addEventListener('pause', function(){ 272 if(set_autoplay == true){ 273 $gallery_single_slider.slick('slickPlay'); 274 } 275 videoStatus = 'pause'; 276 }, false); 277 $video.addEventListener('ended', function(){ 278 if(set_autoplay == true){ 279 $gallery_single_slider.slick('slickNext'); 280 } 281 videoStatus = 'ended'; 282 }, false); 283 } 284 } 285 CheckVideo(); 286 $gallery_single_slider.on('beforeChange', function(slick, currentSlide){ 287 if($gallery_single_slider.find('.slick-current video').length){ 288 var $video = $gallery_single_slider.find('.slick-current video')[0]; 289 if($video.paused){ 290 videoStatus = 'paused'; 291 } 292 } 293 }); 294 $gallery_single_slider.on('afterChange', function(slick, currentSlide){ 295 CheckVideo(); 296 }); 297 $gallery_single_slider.find('.video i').on('click', function(){ 298 var $video = $(this).next()[0]; 299 if($video.paused){ 300 $video.play(); 301 }else{ 302 $video.pause(); 303 } 304 }); 305 306 /*-----*/ 307 308 }); 309 } 310 311 /*--add_design6 masonry--*/ 312 313 function gallery_archive_masonry(){ 314 $('.gallery_archive.add_design6 .masonry').masonry({ 315 itemSelector: '.inner_item', 316 percentPosition: true, 317 }); 318 } 319 gallery_archive_masonry(); 320 $(window).load(function(){ 321 gallery_archive_masonry(); 322 }); 323 $(window).on('resize', gallery_archive_masonry); 324 325});
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.