I have tried a ton of solutions and am in the hair pulling stage, if anyone can help it would be deeply appreciated... TIA. :)
I am attempting to display the contents of a JSON array in my HTML with proper styling in place. Here is the JSON array I am loading: http://highendwholesale.com/json.php
Here is the result I get when using the code below, as you can see it loads fine but without styling -- if anyone can help me get this working I would be grateful: http://highendwholesale.com/test.php
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajaxSetup({ cache: false });
$.getJSON("json.php", function(data){
$('ul#myInventory').empty();
$.each(data, function(index, d){
$('ul#myInventory').append("<li><a href='#'><img src='http://highendwholesale.com/listings/"+d.CID+"/thumb/1.jpg' height='80' width='80' alt='"+d.CID+"' /><h2>"+d.title+"</h2><p>"+d.blurb+"</p></a></li>");
});
$('ul#myInventory').trigger("create");
}).error(function(jqXHR, textStatus, errorThrown){
alert("error occurred!");
});
$('ul#myInventory').listview('refresh');
});
</script>
</head>
<body>
<div data-role="page" id="index" data-theme="d">
<div data-role="header">
<h1>Inventory</h1>
</div><!-- /header -->
<div data-role="content">
<div id="inventory">
<ul data-role='listview' id='myInventory' data-inset='true' class='ui-listview ui-listview-inset ui-corner-all ui-shadow'></ul>
</div>
</div><!-- /content -->
</div>
</body>
</html>