Empfehlen
Share
Getagged in
var anchor = function() { $('#header .nav-item.has-submenu > a').unbind('click'); $('#header .nav-item.has-submenu > a').on('click', function(e) { e.preventDefault(); var href = $(this).attr('href'); href = href.substring(href.indexOf("#")); if(href) { $(window).scrollTo(href, {duration:'slow'} ); }; }); }; $(document).ready(function() { anchor(); }); $(window).load(function() { anchor(); });