<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


Client-side paging of dynamically generated records with jQuery Template & Pagination Plugins

I'm amazed at the sheer number of jQuery plugins that developers worldwide painstakingly build & voluntarily share. There is a vibrant, responsive jQuery community online that offers feedback & support to those seeking it. This community is one big reason which makes jQuery special when compared to other JavaScript libraries.

To display dynamically generated records with client-side paging, I recently tried out Microsoft's jQuery Template plugin (minified version: ~6KB) alongwith G Birke's jQuery Pagination plugin (minified version: ~3KB) . I've shared my code sample on JSBin (see source).

This sample is an adaption of Stephen Walther's Templates plugin example & a Pagination plugin example by StackOverflow member brianpeiris. The help I recieved from the StackOverflow forum has been invaluable.

Some of the things I learnt from working with jQuery plugins are -
  • Note which version of a  jQuery plugin you are using & if it needs a specific version of the jQuery library & any other dependent files.
  • Pick Plugins which have good documentation & demos. If you pick a popular one, the chances of getting quick help from online forums will be higher.
  • Find out if the license policy for that Plugin suits your needs. Plugins hosted on Github generally have liberal licensing.
  • Rate Plugins on the jQuery Plugins site so that it can help the author & potential users (requires login)

Labels: , ,

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment