1
내 jQuery-mobile CSS가 작동하지 않습니다. var
이 없을 때 작동하지만 목록이 하나만 표시되며 여러 번 표시됩니다.왜이 jQuery-mobile CSS는 하나의 목록 만 표시하거나 실패합니까?
관련 코드를 동적으로 목록 항목이 아래 사용하는 추가의
$.getJSON(url,function(json) {
var la = "";
$.each(json.post,function(i,post) {
la += "<li><a id='id' class='chat' href='#'><img src='afbeelding'><h2>naam</h2><p>Komt nog</p></a></li>";
});
$("ul:jqmData(role='listview')").append(la);
});
'$ ('data-role = listview ')를 사용하십시오. listview(). listview ('refresh ')'또는'$ ('data-role = listview ' 항목. – Omar
감사! 이제 작동합니다. –
@Omar이 질문을 다른 사람들에게 도움이되도록 답변으로 게시하십시오. 감사. – JohnP