I have created a jsfiddle of my problem. Here is a link to the jsfiddle. I assume this will be easy for someone that has has used jquery mobile a good amount.
I am using jquery mobile in combination with jquery.tmpl. Basically as you can see from the example the I am taking my JSON object and passing it to the .appendTo call. It appears to be correctly using the template to create the <li>‘s
The problem is the the dynamically created <li>‘s do not get the JQM styles like the one I had in there in the mark up.
I have spent a couple hours looking at this and most people say that $("dynamicContentHolder").listview("refresh"); or $("dynamicContentHolder").listview(); or both together will fix the problem. According to JQM documentation (LINK) I should be binding on the pageinit event so this is called every time the page is loaded directly or ajax nav. According to JQM as well (LINK) I should be using .listview('refresh') to updating the styling of the newly added <li>‘s.
It seems like the code should be working, not sure what I am missing.
I had a duh moment, I found the error 2 minutes after I submitted. My jQuery selector was incorrect
$("#dynamicContentHolder").listview("refresh");