I have read all of your comments, but none of the solutions I read seem to work. I have a piece of Jquery code that gets some content from an external PHP script which updates a div in my application. After the new data is loaded, it doesn't have the Jquery Mobile styling. I've seen how some have used .page() or trigger("refresh"), etc... but none of that works to refresh an entire div. Here is my code and the portion of html in question:
function getcontent(pg) {
$("xyz").html("");
$.get("http://myscript.php", function(data) {
$("#xyz").html(data);
$("#xyz").page();
}
HTML:
<div id="xyz"></div>
Really, there's not much to this at all and I just can't figure this out. I had "some" success if I removed the wrapper div ("xyz") and just refreshed the individual elements' listview, buttons, etc., but that's a terribly clumsy method of handling this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…