$ (function () {$ (". Parallax-true"). each (function () {varB = $ ( This), C= B.attr ("data-direction"); if(c = = ="Horizontal_mouse"|| c = ="Vertical_mouse"|| c = ="Both_axis_mouse") { varD = c = = ="Vertical_mouse", E= c = = ="Horizontal_mouse", F= c = = ="Both_axis_mouse"; if(f = = =true) {e=true; D=true } varg =b; varH = g.find (". Parallax-layer"); vari =-.004; varj = -; varK = -; G.on ("MouseMove", function (a) {varb =G.offset (); varc = e? A.clientx-b.left-g.width () *.5:0; varf = d? A.pagey-b.top-g.height () *.5:0; Tweenlite.to (H,3, {scale:1.2 }); Tweenlite.to (H,1, {x:c* J *I, Y:fK( i})}); G.on ("MouseLeave", function () {tweenlite.to (H, -, {x:0, y:0, Scale:1 }) }) } Else { varB = $ ( This). Find (". Bg-layer"), L=B.offset (); B.css ("position","Absolute"); SetTimeout (function () {B.each () {Console.log ("1"); $( This). Parallaxscroll ({speed:.2, Direction:c})}, +) } }) })
<div class= "Cooperative-partner parallax-true" data-intro-effect= "false" data-direction= "Horizontal_mouse" >
<div class= "PARTNER-BG bg-layer" >
<div class= "Partner-scroll parallax-layer" data-invert= "true" style= "Background-image:url (/templates/common/ images/wimg06.jpg); " ></div>
</div>
. cooperative-partner {position:relative; overflow:hidden; padding:35px0; }. Partner-BG {position:absolute; Top:0; Left0; Width -%; Height -%; }. Partner-bg. partner-scroll {position:absolute; Top:0; Left0; Width the%; Height -%; Background-position:center0; -moz-background-size:cover; -o-background-size:cover; Background-size:cover; Background-repeat:no-repeat; -webkit-transition:all Ease0.7s; -o-transition:all Ease0.7s; -moz-transition:all Ease0.7s; Transition:all Ease0.7s; Background-attachment:scroll; }
. partner-bg {position:absolute; top:0; left:0; width:100%; height:100%;}. Partner-bg. partner-scroll {position:absolute; top:0; left:0; width:100%; height:100%; Background-position:center 0 ; -moz-background-size:cover; -o-background-size:cover; Background-size:cover; Background-repeat:no-repeat; }
</div>
Picture mouse movement Slow motion effect