Я использую телефонный пробел и некоторую мобильную инфраструктуру jQuery.Я хочу поместить некоторые данные в список, используя функцию $ .each.Я получаю данные, но список не переходит на css.
Когда я просто помещаю статический тест в упорядоченный список, например так:
<div class="gamelijst" >
<ol >
<li><p><em>The Netherlands</em> is a country in Northwestern Europe, constituting the major portion of the Kingdom of the Netherlands.</p></li>
<li><p><em>The United States of America</em> is a federal constitutional republic comprising fifty states and a federal district.</p></li>
<li><p><em>The Philippines</em> officially known as the Republic of the Philippines, is a country in Southeast Asia with Manila as its capital city.</p></li>
<li><p><em>The United Kingdom</em> of Great Britain and Northern Ireland is a sovereign state located off the northwestern coast of continental Europe.</p></li>
</ol>
</div>
, он получает идеальныйcss, но когда я хочу загрузить в него что-то вроде этого:
function krijgSpellen(){
$.each(jsonopgehaald.games, function(){
$(".gamelijst").append("<li><p><em>" + this.name + "</em> is a country in Northwestern Europe</p></li>"); //<a id=" + this.id + " href='' class='large button'>Play</a>
});
//$(".gamelijst, $.mobile.activePage").listview('refresh');
};
<div class="gamelijst" >
<ol >
</ol>
</div>
Это не займет css, да, я пробовал $ (". gamelijst, $ .mobile.activePage").ListView ( 'Обновить');но это не сработает.