javascript - Refreshing Listview after Append or HTML -
i've been searching problem no 1 works me.
i have html
<div id="divhistoriallistview"> <ul data-role="listview" id="listhistorial"> </ul> </div>
and in javascript function
$("#listhistorial").append("<li><a href='jjj'>hola!</a></li>"); $("#listhistorial").listview();
and run functions many times. first run format listview perfect. sec 1 (and after second!) formats wrong! (like normal ul or worst)
i tried also:
$("#listhistorial").listview("refresh");
and
$("#listhistorial").refresh();
but when seek these, code in javascript don't run (as if error , function ignored completely)
i searched jquery mobile site , there says utilize those... no resutls!
please help!
try this
$("#listhistorial").listview().listview("refresh");
javascript listview cordova dynamic refresh
No comments:
Post a Comment