var loading = false,
loadingbar = $('#loadingbar'),
loadedmax = $('#loaded_max'),
_body = $('body');
$(window).scroll(function(){
if((($(window).scrollTop() + $(window).height()) + 250) >= $(document).height())
{
if(loading == false)
{
loading = true;
loadingbar.css("display", "block");
$.get("load.php?start=" + loadedmax.val(), function(loaded)
{
_body.append(loaded);
loadedmax.val(parseInt(loadedmax.val()) + 250);
loadingbar.css("display", "none");
loading = false;
});
}
}
});
$(document).ready(function()
{
loadedmax.val(250);
});
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.