jQuery UI Widgets Forums General Discussions Multiple Jqx Menu in one page

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 5 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Multiple Jqx Menu in one page #97616

    arnaud
    Participant

    Hi,

    I am trying to implement several jqxMenu on the same page.

    To be as clear as possible, I call 1, 2 or 3 or more product on the same page, depend on what I have on my database.
    And I want every product to be associated with one jqxMenu. So if I have 3 product, I ll have 3 jqxmenu on the same page.

    In the code I only create once the menu like that <div class=’jqxMenu'”>.

    And to get all my product, I do a foreach on all the elements. If I have 3 elements, it will create 3 times the jqxMenu with the mentionned above <div>.

    The first elements work well as expected, but the 2 others don’t work, like if the jquery widget wasn’t called anymore.

    It works with using an ID for each element instead of a class, but I can’t do that because I don’t know how many elements I ll have on each page.

    I have tried this but it doesnt work :

    $(“.jqxMenu”).each(function(){
    $(this).jqxMenu({ width: ‘250’, mode: ‘vertical’});
    });

    Thanks for helping

    Multiple Jqx Menu in one page #97667

    Hristo
    Participant

    Hello arnaud,

    I would like to suggest you look at this example.
    If you still have trouble please, clarify what you mean by “the 2 others don’t work”? Also, you could provide me the message of the error if there was something in the console.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    • This reply was modified 5 years ago by  Hristo.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.