Преглед изворни кода

remove Class when not in view

ouidade пре 3 година
родитељ
комит
1d89d1c53a
1 измењених фајлова са 3 додато и 1 уклоњено
  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')
+              }
       });
     });