動的な折りたたみ可能なセットを作成し、各セットに動的なリストビューを追加しています。
これが私がやっている方法です:
function querySuccess(tx, results) {
$.each(results.rows,function(index){
var row = results.rows.item(index);
var list=$('#List').append('<li><h3 class="ui-li-heading">'+'</h3><p class="ui-li-">'+row['data']+'</p></li>');
var div = '<div data-role="collapsible" data-inset="false" data-iconpos="right"><h3>'+row["data"]+'</h3></div>';
$(list).appendTo(div).parent().appendTo('[data-role="content"]').end().trigger("create");
$('div[data-role=collapsible]').collapsible({theme:'c',refresh:true});
});
}
ただし、動的リストビューは最後の折りたたみ可能な要素にのみ追加され、他の要素には追加できません。私が犯している間違いは何ですか?