Need help in JQuery scroll function
Posted
by
KillerFish
on Stack Overflow
See other posts from Stack Overflow
or by KillerFish
Published on 2010-12-28T11:38:28Z
Indexed on
2010/12/28
11:53 UTC
Read the original article
Hit count: 147
jQuery
I am developing a small project and i need a help in JQuery Scroll event. I wrote code loading data while scrolling using following code
$(window).scroll(function(){
if ($(window).scrollTop() > ($(document).height() - $(window).height())*.75){
$('#loadingimage').css({"bottom":"10px", "right":"10px"}).fadeIn('fast');
$.ajax
({
type: "POST",
url: "../../scroll_load.php",
data: "letter="+letter+"&start="+start,
success: function(msg)
{
$('#new_music_videos .appendvideos').append(msg).children(':last').hide().fadeIn('slow');
$('#loadingimage').fadeOut('fast');
}
});
}
});
But data loading while the scroll bar is moving at bottom of the screen only. How can i make it for scroll upto 3/4 of the screen.
Thanks a Lot.
© Stack Overflow or respective owner