Home arrow JavaScript arrow Page 3 - Introducing the Quick Pagination jQuery Plug-in
JAVASCRIPT

Introducing the Quick Pagination jQuery Plug-in


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.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
December 18, 2009
TABLE OF CONTENTS:
  1. · Introducing the Quick Pagination jQuery Plug-in
  2. · Setting the stage for the Quick Pagination jQuery plug-in
  3. · Adding behavior with the Quick Pagination jQuery plug-in
  4. · Finishing the example

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
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:

<script src="jquery-1.3.2.min.js" type="text/javascript"></script>

<script src="jquery.quickpaginate.js" type="text/javascript"></script>

<script type="text/javascript">

$(document).ready(function(){

$("#datacontainer p").quickpaginate({ perpage: 1, showcounter: true });

});

</script>

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.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials