瀏覽代碼

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