1 2$(document).ready(function(){ 3 var $elementsA = $( '*[data-animation]' ); 4 var $elementsS = $( '*[data-scroll]' ); 5 var h = $(window).height(); 6 7 //animation 8 $elementsA.each( function( i, el ) { 9 var $el = $( el ), 10 $delay = $el.data('delay'); 11 12 if($delay>0){ 13 $el.css({ 14 '-webkit-animation-delay':$delay+'s', 15 'animation-delay':$delay+'s' 16 }); 17 } 18 19 var t = $el.offset().top; 20 21 if(t > h){ 22 $el.addClass('wait-animation'); 23 }else{ 24 $el.addClass('animated'); 25 } 26 27 $(window).scroll(function () { 28 var ltop = $(this).scrollTop(); 29 var lt = $el.offset().top; 30 31 if(ltop > (lt - 600)){ 32 $el.removeClass('wait-animation').addClass('animated'); 33 } 34 35 }); 36 37 }); 38 39 //scroll 40 $elementsS.each( function( i, el ) { 41 var $el = $( el ), 42 $speed = $el.data('speed'); 43 44 $(window).scroll(function () { 45 var ltop = $(this).scrollTop(); 46 47 if($el.data('scroll') === 'up'){ 48 if( $el.hasClass( "bg-item-01") || $el.hasClass("bg-item-02") ){ 49 $el.css({ 50 'transform':'translate(0,'+ (ltop/h)*$speed +'px) translate3d(0,0,0)' 51 }); 52 }else{ 53 $el.css({ 54 'top':(ltop/h)*$speed + 'px' 55 }); 56 } 57 }else if($el.data('scroll') === 'down'){ 58 if( $el.hasClass( "bg-item-01") || $el.hasClass("bg-item-02") ){ 59 $el.css({ 60 'transform':'translate(0,'+ -(ltop/h)*$speed +'px) translate3d(0,0,0)' 61 }); 62 }else{ 63 $el.css({ 64 'top':-(ltop/h)*$speed + 'px' 65 }); 66 } 67 } 68 }); 69 70 }); 71 72});
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.