119
rated 0 times
[
122]
[
3]
/ answers: 1 / hits: 15998
/ 13 Years ago, sat, december 31, 2011, 12:00:00
Please can you people guide me how to make ajax call when scroll down
More From » ajax
Please can you people guide me how to make ajax call when scroll down
var no=1;
$(window).scroll(function () {
if(no==1)
{
if ($(window).height() + $(window).scrollTop() == $(document).height()) {
no=2;
$.ajax({
type: POST,
url: request.php,
data: datas,
cache: false,
success: function(html){
}
});
}
}
});
This does an ajax call when a user reaches at end of page.
You can specify a height at which it occurs.