Im using $.getJSON
to fetch data from the server side to populate the data in my jquery mobile app. The problem Im having is that the json result that I fetch contains HTML tags. When I append this data to the div in app, the HTML tags are retained as they are Looks like this now
var menDet;
menDet="<ul><li>Offer
<ul>"+data+"</ul></li><ul>";
//data contains a <p> tag from the server side fetched data
$("#menu").html($(menDet));
$("#menu").listview("refresh");
From the Inspect element window, I just noticed the data value is getting wrapped within quotes and thats preventing the HTML from being applied to the HTML tags within the quotes !
Any ideas on how I can add them without them being wrapped in quotes?