jquery mobile assign data to listview with list divider -


here code try assign json listview

$.each(result, function(i, item) {     //alert(item);     if (item.class == "foruminfo" ) {           $("#pages_list").append($("<li></li>",{"html":"<a href='#page_node_view' id='" + item.text + "' class='page_node_pages_list_title'>" + item.text + "</a>"}));     }     if (item.class == "group") {           $("#pages_list").append($("<li data-role='list-divider' role='heading'></li>",{"html": item.text}));     } }); 

the list divider can't show text, problem?

try same thing without json objects

$.each(result, function(i, item) {     //alert(item);     if (item.class == "foruminfo" ) {           var list_item = $("<li></li>");           list_item.html("<a href='#page_node_view' id='" + item.text + "' class='page_node_pages_list_title'>" + item.text + "</a>");           $("#pages_list").append(list_item);     }     if (item.class == "group") {           var list_divider = $("<li data-role='list-divider' role='heading'></li>");           list_divider.html(item.text);           $("#pages_list").append(list_divider);     } });