jquery - Using 2 $(Window).scroll scripts -


I am using 2 scripts which are dependent on $ (window) .scroll function for a perpendicular image. Js and inview.js for a CSS3 animation, while the element is in the viewport both scripts are as follows

Inview.js

  $ (function () {var $ Blocks = $ ('AnimBlock.notViewed'); var $ window = $ (document); $ window.on ('scroll', function (e) {$ blocks.each (function (i, amm) {if ( $ (This) .hasClass ('View')) Return; isScrolledIntoView ($ (this));});});}); Function isScrolledIntoView (elem) {var docViewTop = $ (window) .scrollTop (); Var docViewBottom = docViewTop + $ (window). Light (); Var elemOffset = 0; If (elem.data ('offset')! = Undefined) {elemOffset = elem.data ('offset'); } Var elemTop = $ (elem) .offset () Top; Var elemBottom = elemTop + $ (elem). height (); If (if elemOffset! = 0) {// is based on custom offset scrolling direction (docViewTop - elemTop> = 0) {// scrolling with elemTop = $ (elem) .offset () Top + elemOffset; } The other {// has been scrolled below elemBottom = elemTop + $ (elem). Heights () - elemOffset}} If ((elemBottom & lt; = docViewBottom) & amp; amp; amp;; & amp; ;; = docViewTop) display an element squares $ (AMM) Does .removeClass ('notViewed'). AddClass ('viewed'); Var animElemsLeft = $ ('.AimmanBlock.notview'). Length; If (Animated Lift == 0) {// Scroll Event $ (Window) debit with no animated elements left. Off ('scroll'); }}}   

Perpendicular script is with the following link

Now the issue is that these two scripts are using $$ (Window) .scroll, parallax has stopped working and a white space has appeared instead of the image. You can see the HTML working on the following link

Please know how can I remove it.

Thanks in advance!

Use jQuery's namespace in both script events like this:

  $ window.on ('scroll. (' Scroll_imagescroll '); // CODE    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -