selladurai selladurai - 4 months ago 45x
Javascript Question

How to create list in HTML dynamically?

In my jQuery mobile app, I want to display the result from a web service in a list. How do I create the list dynamically?

var arr = ["list", "items", "here"];
for(var i in arr) {
    var li = "<li>";