I'm extremely lazy in terms of programming: if someone's written it, I'm going to use it. In fact, the first thing I do (except when I'm reinventing the wheel for learning purposes) is check to see if there's a library for problem X.
An example: we're using the DataTables jQuery plugin to make our tables look pretty. Now, data tables has some nice features:
- Pagination
- Sorting
- Searching (which updates the results instantly)
- Easy to integrate (just a one liner)
After spending some time looking for some solutions, we decided to drop DataTables in favor of tablesorter, another jQuery table plugin.
We decided to use tablesorter over DataTables for a couple reasons:
- It wasn't working with our AJAX setup (as mentioned)
- At first we were using the other features, but then we stopped using pagination and searching
- tablesorter integrates just as easily
- tablesorter is more light-weight (12kb vs 60kb)
- tablesorter works for our purposes with no exciting changes (we add a line in our success function to refresh the table)
- download minified js file
- add to project
- add two lines of code to existing script files
* apologies for the multiple bulleted lists, I do kind of like them though.
No comments:
Post a Comment