Преглед на файлове

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')
+              }
       });
     });