$(window).scroll(function () {
if ($(document).height() <= $(window).scrollTop() + $(window).height()) {
//alert("End Of The Page");
var offset = parseInt($("#offset").val());
offset = offset+10;
$("#offset").val(offset);
//alert(offset);
$("#loader").show();
//making ajax call
$.ajax({
url: '<?php echo $Config->LivePath.'employee/profile/get-employee.php'; ?>',
data: { offset: offset, limit: 10 },
type: "POST",
success: function(responsedata){ //alert(response);
$("#profile-container").append(responsedata);
$("#loader").hide();
} //end success

}); //end ajax
} //end if
});

Advertisements