jquery scroll more data


var page = 1;
function getFeedItems() {
$('.loading').show();
$.ajax({
url : 'home_loadmore.php',
data : 'page=' + page,
type : 'GET',
success: function(a) {
if (a == '') {
$('#feed-list').append('
·  No more records found.
');
$(window).scroll(function() {});
$('.loading').hide();
} else {
$('#feed-list').append(a);
$('.loading').hide();
}
}
});
}
$(document).ready(function() {
getFeedItems();
$(window).scroll(function()
{
if($(window).scrollTop() == $(document).height() - $(window).height())
{
page = page+1;
getFeedItems();
}
});
});

Comments

Popular posts from this blog

php format date string short month

curl service example in php