162
rated 0 times
[
166]
[
4]
/ answers: 1 / hits: 23884
/ 13 Years ago, tue, february 14, 2012, 12:00:00
In the moment I can add li tags to my list with script. But how can I add dynamically li tags in a function in .js? Hopefully I will see a good example.
Below is my code. Thanks!
<div data-role=page id=searchPage data-theme=b>
<div data-role=content>
<ul data-role=listview data-filter=true data-theme=b id=searchListUl>
</ul>
</div>
<script type=text/javascript>
$(#searchListUl).append('<li data-filtertext=Apple><a href=#>Apple</a></li>');
$(#searchListUl).listview('refresh');</script></div>
More From » jquery