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.

Have I to add classes manually (eg. has-submenu current)

Home Forums Older releases 1.0.x Have I to add classes manually (eg. has-submenu current)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #3035

    I have a general understandingproblem how to maintain classes.

    When the page is loading first time the menu gets loaded.
    Then I click a menu-item and the href sends a new request to the server.
    So my page gets loaded again with menu and content.
    How can I supply the Information about class=current and submenu?

    I modified my PHP witch generates the menu so class=current is included (that works).
    So have I to backtrace with PHP to add class=has-submenu and current to the parents?

    I think there must be an other way. Can someone point me in the right direction?


    If you use the markCurrentItem: true option, the script will automatically add the “current” class to the proper item so you won’t need to do it server-side with PHP:

    As for the “has-submenu” class – it is automatically added to the parent items’ A elements when the script initializes the menu tree so you don’t have to worry about it.


    oh – yes.
    Now I see where I can define the options.

    Here an example maybe it helps some other reader:

    $(function() {
    		subMenusSubOffsetX: 1,
    		subMenusSubOffsetY: -8,
    		markCurrentItem: true,
    		markCurrentTree: true

    When I apply the “current” class with a different link color, the subindicator arrow (css sprite) isn’t affected, it stays with the old color. Is it possible to let it have the “current” class color?


    Which theme are you using? I’d suggest customizing the colors via Codepen by editing the SASS variables – i.e. select the theme you like here:

    click ‘Customize “theme_name” on Codepen’ and then edit the color variables you like.

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