I am having one url
url = someurl?limit=5
This will return the 5 elements the format is
"count": 290,
"next": "someurl?limit=5&offset=5",
"previous": null,
"status": true,
"result": []
What I need to implement a pagination
In initial load it need to be 5 and after scrolling the new datas are append to it
$.ajax({
dataType: "json",
url: url,
success: function(data) {
***********some stuffs for appending data in to html ****
}
In this success data I am getting next url when I was calling data.next
How do I call the same ajax call while data.next to null