Greeting,
I am trying to replace data-theme but never apply change with trigger.('create')
or listview('refresh')
Please test my code at JSFIDDLE
Thank you for your help
Here is my code ...
HTML:
<div data-role="page" id="home">
<div data-role="content">
<div>
<ul id="uuu" data-role="listview">
<li id="kkk" data-theme="e">fail change to theme A</li>
</ul>
</div>
</div>
</div>
JavaScript :
$('#uuu').append('<li data-theme="a">success change to theme A</li>');
$('#kkk').attr('data-theme', 'a'); // I need do this through ajax
// ======
$('#home').trigger('create');
$("#uuu").listview("refresh");
$("#kkk").listview("refresh"); // this is not working ?