1;(function ($) { 2 3 $('img.youtube-video-carousel-item').on('click', function( event ){ 4 event.preventDefault(); 5 6 // update iframe attached to this shortcode 7 var $container = $(this).parents('.youtube-video-playlist-carousel .show-primary-video').first(); 8 9 // if iframe for this particular shortcode is disabled, use the first one configured on this page 10 if(!$container.length) { 11 $container = $('.youtube-video-playlist-carousel .show-primary-video').first(); 12 } 13 14 $iframe = $container.find('#primary-video iframe'); 15 16 $iframe.attr( 'src', 'https://www.youtube.com/embed/' + $(this).data('youtube-id') ); 17 $container.find('.video-title').text( $(this).data('video-title') ); 18 $container.find('.video-date').html( 'Added On ' + $(this).data('added-on') ); 19 20 // scroll video into view 21 $([document.documentElement, document.body]).animate({ 22 scrollTop: ($iframe.offset().top - 175) 23 }, 500); 24 25 }); 26 27 // links below the video should link to the video post now, and NOT start the video 28 // saving this code here in case we change our mind... 29 // 30 // $('.youtube-video-playlist-feed li a').on('click', function( event ){ 31 // event.preventDefault(); 32 // $('.youtube-video-playlist-feed li').removeClass('active'); 33 // $(this).closest('li').addClass('active'); 34 // var youtube_id = $(this).data('youtube-id'); 35 // $(this).closest('.youtube-video-playlist-feed').find('.primary-video').html('<iframe width="360" height="169" src="https://www.youtube.com/embed/'+youtube_id+'??rel=0&showinfo=0&autoplay=1&mute=1&modestbranding=1&controls=1&cc_load_policy=0" frameBorder="0" allow="autoplay; encrypted-media" allowFullScreen></iframe>'); 36 // }); 37
38 var jcarousel = $('.jcarousel'); 39 40 jcarousel 41 .on('jcarousel:reload jcarousel:create', function () { 42 var carousel = $(this), 43 width = carousel.innerWidth(); 44 45 if (width >= 600) { 46 width = width / 5; 47 } else if (width >= 350) { 48 width = width / 2; 49 } 50 51 carousel.jcarousel('items').css('width', Math.ceil(width) + 'px'); 52 }) 53 .jcarousel({ 54 wrap: 'circular', 55 }); 56 57 58 $('.jcarousel-control-prev').jcarouselControl({ 59 target: '-=1' 60 }); 61 62 $('.jcarousel-control-next').jcarouselControl({ 63 target: '+=1' 64 }); 65 66})(jQuery);
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.