Browse Source

fixe autoscroll bug, limit behaviour to front page

Bachir Soussi Chiadmi 7 years ago
parent
commit
5bd36c66a3

File diff suppressed because it is too large
+ 0 - 0
sites/all/themes/figureslibres/clameurs/js/dist/script.min.js


+ 10 - 9
sites/all/themes/figureslibres/clameurs/js/script.js

@@ -56,15 +56,16 @@
 
   function initAutoScroll(){
     console.log('initAutoScroll');
-    var anchor = $('a.anchor.publie', "#thematique-anchor-links").last().attr('href');
-    console.log(anchor);
-    (function(anchor){
-      setTimeout(function(){
-        console.log('Timeout');
-        window.location.href = anchor;
-      }, 1000);
-    })(anchor);
-
+    if($('body').is('.front')){
+      var anchor = $('a.anchor.publie', "#thematique-anchor-links").last().attr('href');
+      console.log(anchor);
+      (function(anchor){
+        setTimeout(function(){
+          console.log('Timeout');
+          window.location.href = anchor;
+        }, 1000);
+      })(anchor);
+    }
   };
 
   init();

Some files were not shown because too many files changed in this diff