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.

method ItemActivate

Home Forums Older releases 0.9.x method ItemActivate

  • This topic has 2 replies, 2 voices, and was last updated 8 years ago by Sig.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1269
    Sig
    Participant

    Hello, I am not clear how to use the method ItemActivate.

    what should be the value ItemActivate?
    myItem be defined as a class A?

    $ ('# main-menu'). SmartMenus ('ItemActivate', $ ('a # myItem'));

    my code

    < li id="menu-item-8" >< a class="myItem" href= " # " >About</ a >
    #1458
    admin
    Keymaster

    Hi,

    If you already have an id on the parent LI:

    <li id="menu-item-8"><a href="#">About</a>

    you can use the following JS:

    $('#main-menu').smartmenus('itemActivate', $('#menu-item-8 > a'));

    Otherwise, you could also use the following (set an id to the A element instead of class):

    <li><a href="#" id="myItem">About</a>

    and the JS:

    $('#main-menu').smartmenus('itemActivate', $('#myItem'));

    Let me know if you still have any troubles.

    Cheers!

    PS: All methods are case sensitive, so be careful with that too.

    #1459
    Sig
    Participant

    Thank you very much, I’ve tested and works

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