Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var GetData;
- var serviceURL = "http://my_server.com/";
- function LoadAjax(){
- $.ajax({
- type : 'GET',
- url : serviceURL + 'DataReadNP.php',
- async: true,
- beforeSend: function(x) {
- if(x && x.overrideMimeType) {
- x.overrideMimeType("application/j-son;charset=UTF-8");
- }
- },
- dataType : 'json',
- success : function(data){
- GetData = data.items;
- $.each(GetData, function(index, MyData) {
- $('#dataList').append(
- '<li><a href="detail.html?id=' + MyData.id + '">' +
- '<h4>'+ MyData.topic+'</h4>' +
- '<img src="'+MyData.img+'"/>' +
- '<p>' + MyData.detail+ '</p>' +
- });
- $('#dataList').listview('refresh');
- },
- error : function(){
- alert('Your Connection Is Trouble')
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement