Browse Source

added autoscroll

Bachir Soussi Chiadmi 7 years ago
parent
commit
6d57f8a088

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


+ 14 - 0
sites/all/themes/figureslibres/clameurs/js/script.js

@@ -28,6 +28,7 @@
   function init(){
     console.log('Clameurs Theme');
     initHeaderAnime();
+    initAutoScroll();
   };
 
   function initHeaderAnime(){
@@ -53,6 +54,19 @@
     });
   };
 
+  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);
+
+  };
+
   init();
 
 })(jQuery);

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