What I am Working on: “InfiniteScroll”
I’ve been working on a nifty little project for the last few days. To be brief, it’s a jQuery plugin that allows for infinite scrolling. You’ve probably seem similar examples around the web from time to time. But if not, the plugin will either scan an images directory or query a database (depending on which you choose). If you’re pulling in five-hundred rows from a database, it doesn’t make much sense at all to select EVERY row. Instead, we generally use pagination to query only a handful at a time. Instead of clicking on a link to trigger the next page (or set of items), this plugin will automatically display the next set of items when the user scrolls down the page.
Bugs and Complications
I still have a few more bugs to work out before I release a full screencast on Nettuts+ that details how to build it. At the moment, I’m having some trouble making it as “plug and play” as possible. The reason is because the plugin makes AJAX calls to a PHP script, which will either query the database or scan a directory – with scandir(). Unfortunately, though I wish it wasn’t, the server-side functionality is a necessity. With that said, there are some really neat features here that I can’t wait to show you all. I just need a couple more days to finish it.