javascript - include json data in the load more button function -


how include json data in load more button function at

load more button : jsfiddle example

    var index = 1; $(document).on("pagecreate", "#page1", function(){     $("#btnadd").on("click", function(){         var allitems = '';         (var = 0; < 100; i++) {             allitems += '<li><a href="javascript:showdetails(' + (index + i) + ')" >item number ' + (index + i) + '</a></li>';         }                 index += 100;          $("#listtemp").empty().append(allitems).listview("refresh");          var element = $("#listtemp li").detach();         $("#listdspqry").append(element);     });    }); 

my json url : http://www.beritanisma.com/category/superlawak/?json=get_category_posts

been trying days ended showing no results, please me masters, thank you..

var index = 0; $(document).on("pagecreate", "#page1", function(){     $("#btnadd").on("click", function(){          var url = "http://www.beritanisma.com/category/superlawak/?json=get_category_posts"          $.getjson(url, function(data){            var allitems = '';             (var = 0; < data.posts.length; i++) {                 console.log(data.posts[i].url);                   allitems += '<li><a href="javascript:showdetails(' + (index + i) + ')" >'+data.posts[i].url+'' + (index + i) + '</a></li>';                 }         index += 100;          $("#listtemp").empty().append(allitems).listview("refresh");          var element = $("#listtemp li").detach();         $("#listdspqry").append(element);          });          });    }); 

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -