Reputation:
I'm trying to load new content to my page from database when user scrolls to the bottom of a page. How this would be achieved? I've tought of jquery's ajax and php combined, but I have no idea.
Upvotes: 0
Views: 1578
Reputation: 1650
No need for any plugin i gues. jQuery code for this
$(window).scroll(function () {
if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) {
//Add jQuery ajax code here to fetch data from server/database and append more elements etc
}
});
Upvotes: 1