I created collapsible listview in jquery mobile. It this one as dynamically. If I created collapsible in html code, it display fine. The same one I tried as dynamically, then the styles are not applied.
Code in Html page:
<div data-role="collapsible">
<h2>Bucks County<br>BU</h2>
<ul data-role="listview">
<li><a href="index.html">Location </a></li>
</ul>
</div>
Code in Jquery:
$("#lsititems").append('<div data-role="collapsible">'+
'<h2>'+data[0].SiteName+'<br>'+data[0].SiteCode+'</h2>'+
'<ul data-role="listview">'+
'<li>'+'<a href="index.html">'+'Location'+'</a>'+'</li>'+
'</ul>'+
'</div>')
I tried this one also:
$("#lsititems").append("<div data-role='collapsible'>"+
"<h2>"+data[1].SiteName+"<br>"+data[1].SiteCode +"</h2>"+
"<ul data-role='listview'>"+
"<li>"+"<a href='index.html'>"+"Location"+"</a>"+"</li>"+
"</ul>"+
"</div>")
O/P:
From above code, first one created from Html, 2nd and 3rd created from dynamically in jquery. What's wrong in my code.. please help me.. Thanks in advance...