Pb with an inset listview. How to refresh/create it ?
Hi,
I have a question about en inset listview.
I can't manage to refresh the listview. Only the inset list inside is refreshed.
Do you know how should I do ?
I am using jqm 1.4.4
Cheers !
- function renderList_house_objects(device) {
- $('#house_objects_schema li').remove();
-
- $.each(JSON.parse(window.localStorage.getItem("objects")), function(index, item) {
- $('#house_objects_schema').append('<li data-role="collapsible" data-iconpos="right" data-inset="false">');
- $('#house_objects_schema').append('<h2>'+ item +'</h2>');
- $('#house_objects_schema').append('<form>');
- $('#house_objects_schema').append('<fieldset data-role="controlgroup" data-type="vertical">');
- $.each(JSON.parse(window.localStorage.getItem(item)), function(index, item1) {
- $('#house_objects_schema').append('<label>'+item1.value.header.source+'<input type="checkbox" id="choose-object-inset-'+ item1.key +'"></label>');
- });
- $('#house_objects_schema').append('</fieldset>');
- $('#house_objects_schema').append('</form>');
- $('#house_objects_schema').append('</li>');
- });
-
- $('#house_objects_schema').listview('refresh');
- $('#house_objects_schema').listview().listview('refresh');
- $('#house_objects_schema').trigger('create');
- }