Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Menu Toggle - flashes mobile menu briefly on every page load

Home Forums Older releases 0.9.x Menu Toggle - flashes mobile menu briefly on every page load

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1349
    YellowPhoenix
    Participant

    Hi there,

    I’m using your menu toggle instructions on my new page however the menu flashes briefly every single time the page loads on mobile mode:

    http://gjs.co/equipment/new/?test=1

    Is there any way to stop this?

    Cheers
    Greg

    #1644
    admin
    Keymaster

    Hi Greg,

    Hmm, yep I noticed it. It seems on pages that take a bit more time to load (i.e. to fire the DOMContentLoaded event) this effect might be noticeable. I will think about possibly a bit improved sample code in the docs but you can fix the issue in the meantime by adding the collapsed class to your menu tree in the source by default:

    <ul id="main-menu" class="sm sm-gjs hidden-print collapsed">

    Let me know if you still have any troubles.

    Cheers!

    #1645
    YellowPhoenix
    Participant

    Thank you so much! Worked a treat

    #1684
    Hakpersson
    Participant

    Adding the ‘collapsed’ solves the issue, but in my case the submenus and the pended + is gone. In other words the menu renders useless. Any advice or have I misses something vital here?

    #1685
    admin
    Keymaster

    There is probably some other reason for this – simply adding that class shouldn’t cause the sub menus to stop working. If possible, please post some kind of live demo and I will try to investigate it.

    #1686
    Hakpersson
    Participant

    Sorry! My bad, I had missed a ” in another expression that put the menu out of order. Works perfectly now. Thanx for a fast reply anyhow!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.