1(function($) { 2 "use strict"; 3 4 function doAnimations(elements) { 5 var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; 6 elements.each(function() { 7 var $this = $(this); 8 var $animationDelay = $this.data('delay'); 9 var $animationDuration = $this.data('duration'); 10 var $animationType = 'p-tick ' + $this.data('animation'); 11 $this.css({ 12 'animation-delay': $animationDelay, 13 '-webkit-animation-delay': $animationDelay, 14 '-webkit-animation-duration': $animationDuration, 15 'animation-duration': $animationDuration, 16 }); 17 $this.addClass($animationType).one(animationEndEvents, function() { 18 $this.removeClass($animationType); 19 }); 20 }); 21 } 22 if (!Modernizr.touch) { 23 //only do slider animation for desktop only not touch device 24 $('.ani-slider').on('init', function(e, slick) { 25 var $firstAnimatingElements = $('div.slide').find('[data-animation]'); 26 doAnimations($firstAnimatingElements); 27 }); 28 29 $('.ani-slider').on('beforeChange', function(e, slick, currentSlide, nextSlide) { 30 var $animatingElements = $('div.slide[data-slick-index="' + nextSlide + '"]').find('[data-animation]'); 31 doAnimations($animatingElements); 32 }); 33 34 35 36 } 37 38 39})(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.