diff --git a/sites/all/themes/gui/materiobasetheme/js/script.js b/sites/all/themes/gui/materiobasetheme/js/script.js index 006f1056..d18b47a5 100644 --- a/sites/all/themes/gui/materiobasetheme/js/script.js +++ b/sites/all/themes/gui/materiobasetheme/js/script.js @@ -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);