I need to dynamically add a list view. I am able to build the list view dynamically but i am appending
The HTML code snippet.
<ul id="mymenu" data-role="listview" >
</ul>
Jquery Code Snippet.
$("#accpmenu").append('<li><a href='+ "#" + ' id="a" "> <img src="letterheader.png" >'+ this.textContent + ' </a> </li>');
I even want to dynamically build the and then append
Thanks Shyam
After appending you must refresh the list:
$("#mymenu").listview("refresh");
Here is an example which creates a list dynamically.
http://jsfiddle.net/SuSpv/
Let me know if that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With