指定されたコンテナの底に達したときに、マウスのスクロールに基づいて無限スクロールを実装したい。次の基本的な要件が必要なhttp://www.infinite-scroll.com/を検索した後、このプラグインにアクセスしました。
// infinitescroll() is called on the element that surrounds
// the items you will be loading more of
$('#content').infinitescroll({
navSelector : "div.navigation",
// selector for the paged navigation (it will be hidden)
nextSelector : "div.navigation a:first",
// selector for the NEXT link (to page 2)
itemSelector : "#content div.post"
// selector for all items you'll retrieve
});
つまり、次と前のセレクター。次の前のリンクをクリックする代わりに、マウスのスクロールに基づいて無限のスクロールを行うことはできますか?つまり、マウスが指定されたコンテナの下部に到達したときに、ajaxを介してコンテンツをロードします