The plan was to add a scroll w/a loading scroll within a page. 2 problems with that: My loading scroll does not work & I’m not sure if I should use an iframe to implement the loading scroll. Mainly because I have a jQuery sortable, droppable within my div and am not sure if I can drag outside a iframe. Any ideas would be appreciated
$(#win).scroll(function(){
//replaced window with #win, which is the id of the div containg database info
if($(this)[0].scrollTop() == $(this)[0].height()- $(this).height()){
//everytime we scroll we have this function activated
//if statement is saying if we're at the bottom of the page
//$('div#text').hide();
$('div#loadMoreComments').show();
//.show is showing the div above which has the loading animation
$.ajax({
url: "loadem.php?lastComment="+ $(".postedComment:last").attr("id"),
//using get variable to say last comment is equal to + posted
//comment which is the last comment that's displayed &
//that last comment has an id
success: function(html){
if (html){
$("#postedComment").append(html);
//if we are at the bottom we will add comments to the page
//and hide the animation
$('div#loadMoreComments').hide();
//$('div#text').show();
}else{
$('div#loadMoreComments').replaceWith("<div class='box'><center>Finished Loading</center></div>");
//if theres no more to scroll then the finished loading will show
}
}
});
}
});
this code will work the continuous pagination of your page. As far as I am concern it will have no effect on sortable, droppable cause you said it pagination div have covered all child element.
Hope this will help.