jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • lucasmelocvl
    Participant

    Thank you so much, it’s worked.

    I will detail the problem and the resolution:
    I was trying build the page dynamically, with html and js, having same differents instances of same id, they never be render on same time, because of this I think that could work. I had just one div with ‘nav-small’ id on index.html.
    <div id='nav-small-a'></div>
    And one js that render ‘nav-small’, of menu positions different and elements different when necessary.

    function exameple_menu_a(){
    ...
            nav_small.style.top = topPosition;
            nav_small.style.left = leftPosition;
            nav_small.style.right = rightPosition;
            $("#nav-small-a").jqxMenu({
                rtl: false,
                autoCloseOnClick: false,
                source: source,
                width: '180px',
                height: '180px',
                mode: 'vertical',
            });
    ...
    }
    
    funtion exameple_menu_b(){
    ...
            $("#nav-small-a").jqxMenu({
                rtl: true,
                ...
            });
    }
    
    ...

    To resolve:
    But now, I created four div on index.html like ‘name-small-a’, ‘name-small-b’, ‘name-small-c’, ‘name-small-d’.

       <div id='nav-small-a'></div>
        <div id='nav-small-b'></div>
        <div id='nav-small-c'></div>
        <div id='nav-small-d'></div>

    And I created the menu for especific div.

    function exameple_menu_a(){
    ...
            nav_small.style.top = topPosition;
            nav_small.style.left = leftPosition;
            nav_small.style.right = rightPosition;
            $("#nav-small-a").jqxMenu({
                rtl: false,
                autoCloseOnClick: false,
                source: source,
                width: '180px',
                height: '180px',
                mode: 'vertical',
            });
    ...
    }
    
    funtion exameple_menu_b(){
    ...
            $("#nav-small-b").jqxMenu({
                rtl: true,
                ...
            });
    }
    
    ...

    And now, it’s worked correctly with four id.

    I tried to shorten the code , but I ended up getting worse.
    Thank you for your help.

Viewing 1 post (of 1 total)