Parcourir la source

remove Class when not in view

ouidade il y a 3 ans
Parent
commit
1d89d1c53a
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      user/themes/epau-antimatter/js/antimatter.js

+ 3 - 1
user/themes/epau-antimatter/js/antimatter.js

@@ -130,6 +130,8 @@ jQuery(document).ready(function($){
       $('.souligne').each(function () {
         if (isScrolledIntoView(this) === true) {
             $(this).addClass('in-view')
-            }
+            } else {
+              $(this).removeClass('in-view')
+              }
       });
     });