計画は、ページ内に読み込みスクロール付きのスクロールを追加することでした。2つの問題:読み込みスクロールが機能しない&読み込みスクロールを実装するためにiframeを使用する必要があるかどうかわかりません。主な理由は、div内にソート可能でドロップ可能なjQueryがあり、iframeの外にドラッグできるかどうかわからないためです。任意のアイデアをいただければ幸いです
$(#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
}
}
});
}
});