fixe autoscroll bug, limit behaviour to front page

This commit is contained in:
2017-04-09 12:11:42 +02:00
parent 6d57f8a088
commit 5bd36c66a3
2 changed files with 11 additions and 10 deletions
@@ -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();