I am new to web programming.Actually I want to create a list in that I have to add elements dynamically to unordered list.I added elements in list dynamically but I have to anchor tag to that each list item.please help me
HTML:
<div data-role="main" class="ui-content">
<input type="button" id="btnid" onclick="getData()"/>
<p id="p1">
Insert Content Here working
</p>
<ul data-role="listview" data-inset="true" id="ulist" title="nodes list" data-inset="true">
</ul>
</div>
JavaScript:
for (var i = 0; i < jsonData.Element.length; i++) {
var counter = jsonData.Element[i];
//console.log(counter.counter_name);
var newelement=$("<li>"+counter.nodeName+" "+counter.activeCount+" "+counter.inactiveCount+"</li>");
newelement.appendTo("#ulist");
// alert(counter.nodeName);
}