I've tried using the jQuery.mmenu-plugin, found here http://mmenu.frebsite.nl/. It works great with pre-defined lists, but how do I handle lists which are updated with jQuery?
Here's an example of an initialized mmenu:
<nav id="menu" class="mm-menu mm-horizontal mm-ismenu mm-hasheader mm-hassearch mm-current mm-opened">
<div class="mm-panel mm-opened mm-current" id="mm-m1-p0">
<ul id="list" class="mm-list">
<li id="1"><a>item 1</a></li>
<li id="2"><a>item 2</a></li>
<li id="3"><a>item 3</a></li>
</ul>
</div>
</nav>
Then I append items to the list the following way:
$("#list").append('<li id="4"><a>"item 4"</a></li>');
The appended (fourth) li-item won't get the same behavior as the li-items defined before initialize the mmenu. This means that items added after the initialization won't work with the search field, as an example.
Is there a way to reinitiate the mmenu or to update the li-items connected to it?