add scrollto function
This commit is contained in:
parent
ea423f2146
commit
c183a0b0dd
@ -1532,6 +1532,7 @@
|
||||
var materiobasetheme = new MaterioBaseTheme();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Attach collapse behavior to the feedback form block.
|
||||
*/
|
||||
@ -1568,4 +1569,17 @@
|
||||
}
|
||||
};
|
||||
|
||||
//HOME
|
||||
//Click Menu and scroll to part of the page
|
||||
$(".bdd").addClass('database');
|
||||
$('.pane-menu-menu-home-v2 .menu li a').each(function(){
|
||||
var link = $(this).attr("href");
|
||||
var part = link.replace("/fr/", "");
|
||||
$(this).attr('href', '#' +part);
|
||||
$(this).click(function(){
|
||||
var scrollTo = $('.' + part).offset().top -200;
|
||||
$("body").animate({scrollTop: scrollTo}, 2000 );
|
||||
})
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
x
Reference in New Issue
Block a user