1(function ( $ ) { 2 3 $.fn.ceaparallax = function( options ) { 4 5 // This is the easiest way to have default options. 6 var settings = $.extend({ 7 left: this.offset().left, 8 t_top: 100, 9 t_left: 100, 10 y_level: 20, 11 x_level: 40, 12 mouse_animation: 0, 13 ele_width: '20px' 14 }, options ); 15 16 this.css({ 'width': settings.ele_width, 'top': settings.t_top + '%', 'left': settings.t_left + '%' }); 17 18 19 var ele = this; 20 var parent_section = ele.parents("section"); 21 22 if( settings.mouse_animation != '1' ){ 23 if( !parent_section.hasClass('float-parallax-started') ) parent_section.addClass("float-parallax-started"); 24 }else{ 25 26 var last_X = this.offset().left - 50; 27 28 $( window ).mousemove( function( e ) { 29 var change; 30 31 if( !parent_section.hasClass('float-parallax-started') ) parent_section.addClass("float-parallax-started"); 32 33 var xpos = e.clientX; 34 var ypos = e.clientY; 35 36 xpos = xpos * 2; ypos = ypos * 2; 37 38 var last_x = ( last_X + ( xpos / settings.x_level ) ); 39 var last_y = ( ( ypos / settings.y_level ) + settings.t_top/2 ); 40 41 ele.css('top',( last_y + "px" ) ); 42 ele.css('left',( last_x + "px" ) ); 43 44 }); 45 } 46 47 }; 48 49}( 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.