This plugin needs an update. The last few years with him most often problems. I have already reconciled myself and add the code manually))
It is very inconvenient to make 2 plugins if you have a multi-page site.
The plugin is missing an important detail !!! add an indent from the element to which the scroll is going.
Every time you have to conjure with indented sections. In this case, for the mobile version, add more - 90px with jquery.
It also lacks the ability to delay scrolling on click if you have a full-screen menu.
if ($(window).width() < "668") {
$(".menu a").click(function() {
$("html, body").delay(700).animate({
scrollTop: $($(this).attr("href")).offset().top - 90 + "px"
}, {
duration: 2000,
easing: "swing"
});
return false;
});
}
I add the ability to return to the main page with a simple code on the inner pages. It's very necessary by default
$("body:not(.main-page) .sidebar-menu ul.menu li a").each(function() {
var urlConcTop = 'https://' + document.location.host + '/' + $(this).attr('href');
$(this).attr('href', urlConcTop);
});
Please tell me how can I make it. When clicking on the menu on the inner pages, returning to the main, it would be possible to add an indent, now it only works on the main with my code.
investeam.group