Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

One page menu problem

3 weeks 2 days ago #1

  • Alexander's Avatar
  • Alexander
  • Posts: 205
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

3 weeks 1 day ago #2

  • Alexander's Avatar
  • Alexander
  • Posts: 205
Oops, I added a message to the wrong category)) Should have been a regular gridbox question

3 weeks 1 day ago #3

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 23122
Hello,
Thank you for contacting us

There is no need to duplicate messages,
we read and try to help on all topics

Regards,
Vyacheslav, Balbooa.com
Powered by Kunena Forum