I am a newbie for JQuery Mobile.
I tried adding link buttons and Collapsible content dynamically with javascript. They do not render formatted.
What else should I be doing?
I have given below the code snippets.
Any example will be useful for me.
Thanks.
page markup
<ul id= "data_list" data-role="listview" data-inset="true" data-theme="a" data-dividertheme="b">
</ul>
javascript
var buttonstart= "<li><a href="#About">";
var buttonend = "</li>"
$(result.camp_list).each(function (index, item) {
var listitem = buttonstart + item.facilityName + buttonend;
$('#data_list').append(listitem);
});
-------------------------------------------------
page mark up
<div id = "Collapse_list"></div>
javascript
var collapsestart = '<div data-role="collapsible" data-state="collapsed">';
collapsestart += '<h3>About this app</h3>';
collapsestart += '<p>'
var collapseend = '</p></div>';
$(result.camp_list).each(function (index, item) {
var collapseitem = collapsestart + item.facilityName + collapseend;
$('#data_list').append(collapseitem);
});