i have trying to bulid an app that select the posts data from a worpress data.
so its all just need to be an simple <li> elmenets in <ul> in jquery-moblie that show it
this is my code:
the probalme have describeit in the end
<?php /**
* @author yosef yawitz
* @copyright 2012
* @name index.php
**/
require_once 'inc/header.php';
/**
* $query = 'inventory_sku';
* $a = wareHouseAllItems($query);
*/
?>
<script src="js/jqm.autoComplete-1.3.js"></script>
<body>
<div data-role="page" id="indexPage">
<div data-role="header" data-position="fixed">
<h1> בר דעת </h1>
</div>
<div data-role="content">
<ul id="inventoryProducts"data-role="listview" data-theme="g">
</ul>
</div>
<div data-role="footer">
<h1>Comp</h1>
</div>
</div>
<script>
$(document).ready(function(){
$('#inventoryProducts').load('inc/load_posts.php');
});
</script>
</body>
</html>
when i load the ajax in the bottom of the page the <li> elemnet show as normal and not have the jquery css style
I had the same problem. Do an Ajax call, something along the lines of:
And then use this code in Javascript to update your page with the posts you received through the Ajax call.
It solved the problem for me.
Maybe this can help you as well : http://blog.dkferguson.com/index.cfm/2011/3/15/jQuery-Mobile-styling-loaded-content