Problem with changing listview item icon
I want to change the listview item icon from data-icon="false" to data-icon="check" for example dynamically. I have tried many way but while I can query the selector after I set it and it has changed, the actual element does not get an icon. Using jqm 1.45.
- <ul data-role="listview" id=test">
- <li data-icon="false">Line Item</li>
- </ul>
This is the code that I tried:
- $( "#test li" ).listview("option", "icon", "check");
- $( "#test" ).listview("refresh");