Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #590695

    Hi,

    I had to stick my mobile menu to the top of the page to keep it visible when I scroll down.
    When I click the menu it opens as expected, but my problem is that the scroll also jumps all the way to the top of the page.

    Is there a way to prevent it from jumping to the top of the page every time I click on the menu?

    I tried to add a small jquery function just to “preventDefault” on click, but had no effect.

    Thanks

    #590895

    Hi,

    Can you post the link to your website please?

    Regards,
    Josue

    #590962

    Hi,

    I’m not sure it’s necessary, just because this is the default behaviour of the theme :) If you open http://kriesi.at/themes/enfold/ and shrink the window to a tablet size, you’ll see the sticky mobile menu. Now if you scroll down and then click the menu icon, the scroll will instantly jump to the top as the menu opens, which creates the weird effect I’m trying to get rid of!
    And if you close the menu afterwards, you can confirm that you are indeed at the top of the page.

    Thx!

    #591000

    Hey!

    That is intended as mobile menu shows menu items at the top of the page. If it was not auto scrolled to top when you click to open mobile menu, you would need to scroll manually :)

    Best regards,
    Yigit

    #591010

    Oh I see. But is there a way to disable the “jump to top” anyway?

    I’ll be editing the menu animation if necessary, so that wont be an issue

    Thanks

    #591012

    Yea i can see what you’re referring to, changing this would require re-factoring the avia_responsive_menu function (avia.js), unfortunately we can’t really help with that but i’d suggest you posting your request here so Kriesi can see it:

    Best regards,
    Josue

    #591022

    Understood, thanks

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Prevent jump to top of page when mobile menu is clicked on’ is closed to new replies.