I have a website written in HTML/Javascript and I use jquery to load data from MYSQL by calling php files. The website is working. I am trying to phonegap the same website but the data from MySQL is not loading. I am not using localhost in the database connect. Is there something wrong with my jquery?
<!-- Ajax for JSON -->
<script src="dist/js/jquery-1.12.4.min.js"></script>
<div id="featured_items" class="streamline message-box message-nicescroll-bar">
<script type='text/javascript'>
$(document).ready(function () {
/* call the php that has the php array which is json_encoded */
$.getJSON('php/items.php', function (get_items) {
/* data will hold the php array as a javascript object */
$.each(get_items, function (get_items_key, get_items_val) {
$("#featured_items").append(
'//HTML Code Here'
);
});
});
});
</script>
</div>