Home arrow JavaScript arrow Page 3 - Hiding the Page Counter with the jQuery Quick Pagination Plug-in
JAVASCRIPT

Hiding the Page Counter with the jQuery Quick Pagination Plug-in


In this second article in a three-part series, I discuss how to use the Quick Pagination jQuery plug-in for paginating a group of sample HTML paragraphs. In this case, the page counter provided by default was hidden from display, which shows how easy it is to customize the plug-in’s behavior by playing around with its incoming arguments.

Author Info:
By: Alejandro Gervasio
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
December 22, 2009
TABLE OF CONTENTS:
  1. · Hiding the Page Counter with the jQuery Quick Pagination Plug-in
  2. · Review: paginating HTML paragraphs with the Quick Pagination plug-in
  3. · Tweaking the plug-in's parameters
  4. · Putting the pieces together

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Hiding the Page Counter with the jQuery Quick Pagination Plug-in - Tweaking the plug-in's parameters
(Page 3 of 4 )

As you may have already guessed, telling Quick Pagination to hide its default page counter from display is a simple task reduced to calling its “quickpaginate()” method and assigning a value of FALSE to its input “showcounter” argument. Period.

However, to remove the doubts you may have regarding this process, below I included a modified version of the JavaScript snippet shown in the previous segment. This time, it will paginate a collection of paragraphs while keeping the page counter hidden from view. The script that does this looks like this:

<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: 2, showcounter: false });

});

</script>

Well, that’s not rocket science, right? As you can see, now the above JavaScript block not only will display a couple of paragraphs per page, but as I explained before, it’ll remove the default page counter from view, since the corresponding “showcounter” parameter has been assigned a FALSE value. It's simple to read and code as well.

And now that you surely understood how to manipulate this parameter of the Quick Pagination plug-in, I'm going to include the previous JavaScript snippet in the web page containing the set of paragraphs that needs to be paginated.

The fine details of this process will be shown in the upcoming section. Therefore, click on the link below and read the lines to come.


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 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials