You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
595 B
1 lines
595 B
!function(a){var b=a(window),c=b.height();b.on("resize",function(){c=b.height()}),a.fn.parallax=function(d,e,f){function g(){var f=b.scrollTop();j.hasClass("wd-parallax")&&j.each(function(){var b=a(this),g=b.offset().top;g+h(b)<f||g>f+c||j.css("backgroundPosition",d+" "+Math.round((i-f)*e)+"px")})}var h,i,j=a(this);j.each(function(){i=j.offset().top}),h=f?function(a){return a.outerHeight(!0)}:function(a){return a.height()},(arguments.length<1||null===d)&&(d="50%"),(arguments.length<2||null===e)&&(e=.1),(arguments.length<3||null===f)&&(f=!0),b.bind("scroll",g).on("resize",g),g()}}(jQuery); |