jQWidgets Forums

jQuery UI Widgets Forums Navigation Menu, Context Menu How to toggle a menu item

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • How to toggle a menu item #65045

    longtruong
    Participant

    Hello,

    Assume that I have a horizontal menu with five items. If a user clicks on an item, the css of that item is changed. If the user click on that item again, its css is restored back to the original one.

    What should I do to achieve this purpose?

    Thanks,

    Long

    How to toggle a menu item #65054

    Peter Stoev
    Keymaster

    Hi Long,

    This happens automatically: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxmenu/defaultfunctionality.htm?arctic. When you click on item, it goes into active state, when you click again, the dropdown is closed and it goes into highlight state because your mouse is over the item. When you move away the mouse cursor it goes to default state.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    How to toggle a menu item #65070

    longtruong
    Participant

    Hello Peter,

    I understood that behavior. However, my menu only has one level. It means there is no sub menu. So, after clicking on the menu item and moving mouse out of it, its state is restored to the original one. How can I preserve the state as “clicked” and reset it back to normal state after I click on it again?

    Thanks,

    Long

    How to toggle a menu item #65171

    longtruong
    Participant

    Hello,

    I would like to echo my problem again and hope to find out a solution…

    However, my menu only has one level. It means there is no sub menu. So, after clicking on the menu item and moving mouse out of it, its state is restored to the original one. How can I preserve the state as “clicked” and reset it back to normal state after I click on it again?

    Thanks,

    Long

    How to toggle a menu item #65209

    Peter Stoev
    Keymaster

    Hi Long,

    You cannot disable this Menu feature. It’s automatic.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.