1! function( $ ) { 2 'use strict'; 3 4 Codevz_Plus.parallax = function() { 5 6 var body = $( document.body ); 7 8 // On mousemove. 9 $( '[class*="cz_mparallax_"]' ).codevzPlus( 'mparallax', function( x ) { 10 11 $( window ).on( 'mousemove', function( e ) { 12 13 if ( Codevz_Plus.inview( x, 750 ) ) { 14 15 var sp = -( ( parseInt( x.attr( "class" ).replace(/[^\d-]/g, "") ) || 50 ) * 10 ), 16 xx = e.pageX - x.offset().left - ( x.width() / 2 ), 17 yy = e.pageY - x.offset().top - ( x.height() / 2 ), 18 xx = xx / $( this ).width(), 19 yy = yy / $( this ).height(); 20 21 x.css( 'transform', 'translate3d( ' + Math.round( xx * sp ) + 'px,' + Math.round( yy * sp ) + 'px, 0px )' ); 22 23 } 24 25 }); 26 27 }); 28 29 // On scroll. 30 var par = $( '[class*="cz_parallax_"]' ), 31 all = par.length - 1; 32 33 par.codevzPlus( 'parallax', function( x, i ) { 34 35 var c = x.attr( 'class' ), 36 f = c ? parseInt( c.replace( /[^\d-]/g, '' ) ) / 100 : 'undefined', 37 g = ( x.outerHeight(), f ) || 0, 38 j = x.data( 'offset' ) || 0; 39 40 $( window ).on( 'scroll.parallax', function() { 41 42 //if ( Codevz_Plus.inview( x, 750 ) ) { 43 44 var e = ( x.outerHeight(), $( this ).scrollTop() ) + 250, 45 r = Math.round( ( x.offset().top - $( this ).height() / 2 - e ) * g - j ); 46 47 if ( x.hasClass( 'cz_parallax_stop' ) ) { 48 r = r < 0 ? 0 : r; 49 } 50 51 e < $( document ).height() && x.css( 'transform', 'translate' + ( c.indexOf( '_v_' ) >= 0 ? 'Y' : 'X' ) + '(' + r + 'px)' ); 52 53 //} 54 55 }); 56 57 // First position. 58 all === i && $( window ).trigger( 'scroll.parallax' ); 59 60 }); 61 62 }; 63 64 Codevz_Plus.parallax(); 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.