1(function ($) { 2 $.fn.playVideo = function () { 3 var $carrousel = this; 4 var transferSlide = function(elem){ 5 6 var $elem = $(elem); 7 var title = $elem.find('h1').clone(); 8 var learnMore = $elem.find('a').clone(); 9 $carrousel.find('.add-text').html(title).append(learnMore); 10 $carrousel.find('.add-text a').wrap('<div class="text-center carousel-learn-more"></div>'); 11 }; 12 13 $carrousel.find(".item.active video").each(function (i, elem) { 14 try{ 15 elem.play(); 16 } 17 catch(ex){ 18 console.error(ex); 19 } 20 }); 21 $carrousel.bind('slide.bs.carousel', function (e) { 22 $(this).find("video").each(function (i, elem) { 23 setTimeout(function () { 24 try{ 25 elem.pause(); 26 }catch(ex){ 27 console.error(ex); 28 } 29 }, 50); 30 }); 31 }); 32 $carrousel.bind('slid.bs.carousel', function (e) { 33 $(this).find("video").each(function (i, elem) { 34 try{ 35 elem.play() 36 }catch(ex){ 37 console.error(ex); 38 } 39 }); 40 $(this).find(".item.active .carousel-caption").each(function (i, elem) { 41 transferSlide(elem); 42 }); 43 }); 44 45 46 $carrousel.find(".item.active .carousel-caption").each(function (i, elem) { 47 transferSlide(elem); 48 }); 49 50 51 52 return this; 53 }; 54}(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.