In this first part of a three-part series, I provide you with a brief introduction to using the main features offered by the Quick Pagination jQuery plug-in. You'll appreciate many of its features, particularly its flat learning curve.
Introducing the Quick Pagination jQuery Plug-in - Adding behavior with the Quick Pagination jQuery plug-in (Page 3 of 4 )
As I stated in the introduction, the major advantages offered by the Quick Pagination plug-in are its easy learning curve together with its quick configuration. In reality, using the plug-in is as simple as invoking its main method, called not surprisingly “quickpaginate(),” with the proper arguments.
Even so, this is merely theory that needs to be complemented with the corresponding code samples. With that idea in mind, below I coded a short script that shows how to us the plug-in to paginate the set of paragraphs included in the previous “datacontainer” div:
Didn’t I tell you before that using the Quick Pagination plug-in was a breeze? The example above demonstrates this with pristine clarity. Basically, all that this JavaScript code does is download the require dependencies, that is the jQuery library and the plug-in respectively, and then invoke the “quickpaginate()” method by passing to it the number of items that will be displayed per page. In addition, when assigned a value of TRUE, the “showcounter” argument will display a page counter for keeping track of which page the user is currently viewing.
So far, so good. At this point, I’m sure that you’ll have a more exact idea of how to use, at least at a basic level, the Quick Pagination plug-in. So, it’s time to move on and include the previous JavaScript snippet in the sample web page coded in the preceding segment, so you can see how the paragraphs are nicely paginated.
To see how this will be accomplished, go ahead and read the upcoming section. It’s only one click away.