listview inside listview
in jQuery Mobile
•
9 years ago
I want listview dynamically populated with li items which contains a collapsible with another dynamically formed ul li.... how can i achieve this ?
function formatList(qarr) {
var str = "";
for(var i=0; i < qarr.length; i++) {
/* form the list item */
str += '<li data-role="list-divider">' + qarr[i].title + ', ' + qarr[i].date + ' <span class="ui-li-count">'+ qarr[i].c_answers + '</span></li><li ><p style="white-space: normal;">' + qarr[i].question + '</p><br><div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-mini="true"><h1>Answer(s)</h1><ul id="answerlist" data-role="listview" data-inset="true" data-theme="c" data-dividertheme="d" style="text-transform: none;"><li>item 1</li><li>item 2</li></ul></div></a></li>';
}
return str;
}
currently i am trying this code, but the ul li inside it comes as radio button, also collapsible is not applied.
please helpp
1