I am trying to format the output from variable containing an array as a Jquery mobile list. However I am just getting a normal bullet list. If I copy the example Jquery mobile list code into a variable and output this to html, I get a list however no styling from the Jquery mobile. It appears the variable output cannot see the styling information from Jquery mobile? The rest of the page displays correctly.
This code is within a function on the same page as my links to the CSS / JS files, and loads on click.
var output = '<ul data-role="listview" data-inset="true">';
for(name in results){
output += '<li>'+results[name]+'</li>';
}
output += '</ul>';
$("#TomTop").html(output);
$("[data-role=listview]").listview();after$("#TomTop").html(output);.data-rolestated twice? if#TomTopis the id of the listview, thenvar output = '<ul data-role="listview" data-inset="true" id="TomTop>'; and$("#TomTop").html(output).listview();` will refresh listview. Regarding the padding, please post more details of your markup or create a fiddle.