JqueryMobile动态生成listView并实现刷新的两种方法
function queryEntfernungen(tx, results)
alert("This Hello works");
var len = results.rows.length;
// This For works fine
for (var i = 0; i $("div[data-role=content] ul").append('
'+results.rows.item(i).name+'');
}
$("div[data-role=content] ul").listview('refresh'); // This also works
但是下面的方法却也能成功!
function query(tx, results) {
var len = results.rows.length, i, j;
for (i = 0; i $("div[data-role=content] ul").append('
'+results.rows.item(i).name+'');
}
// No listview("refresh") !!
for (j = 0; j $("#selectmenu").append('');
}
$("#selectmenu").selectmenu('refresh', true);
}