I want to send ajax request when my page is first time scrolled to 20% of the actual height of the page .I have tried this but this is not working .
$(window).scroll(function(){
if ($(window).scrollTop() >= ($(document).height() - $(window).height())*0.2){
sendajax();
}
});
Please suggest me what i have done wrong.I have to send only first time when scrolled to 20%