App-Framework How to load a "nav " dynamically when loading a panel with ajax?

135 views Asked by At

How can the "nav menu" be dynamically loaded when loading a panel with ajax? I've tried adding it inside the panel and it works, but it creates a new menu each time an ajax call with the same id.

This is the panel load by ajax, navuser1 is loaded to doom every ajax call.

<div class="panel" title="xxxx" id="panel1"  data-nav="navuser1" >
    <ul class="list">    
        <li> Load Ajax Panel 1  </li>
    </ul>
    <nav id="navuser1">     
       <ul class="list"> 
          <li class="divider">Menus</li>    
          <li><a href="/users"  class="icon home">Home User</li>
       </ul>
    </nav>
</div>
0

There are 0 answers