Problem with displaying list thumbnail list in jqmobile
Hello I have a problem with displaying thumbnail list in jqmobile.
- If I tried>
- <ul data-role="listview" >
- <li>
- <img src="images/album-bb.jpg" />
- <h3><a href="index.html">Broken Bells</a></h3>
- <p>Broken Bells</p>
- </li>
Is everything O.K and looks it like>
But if I try generate it dynamically via
- $(document).ready(function () {
- $.ajax({
- type: "GET",
- url: "data.xml",
- dataType: "xml",
- success: xmlParser
- });
- });
- function xmlParser(xml) {
- //Hide .gif loader image if data are succesully fetched
- // $('#load').fadeOut();
- $(xml).find("SHOPITEM").each(function () {
- $("ul").append("<li><img width=\"80px\" src=\""+$(this).find('IMGURL').text()+"\"/><h3><a href=\""+$(this).find('URL').text()+"\">"+$(this).find('PRODUCT').text()+"</a></h3><p>"+$(this).find('PRICE_VAT').text()+"</p></li>");
-
- });
- }
I got items displayed, but content is not formated correctly.
Where can be problem?
Thanks for aby advice..