Archive for Javascript

5 jQuery Plugins for Manipulating Table Data


If you’ve ever been given a nasty looking CSV file to turn into an easily readable table, you know what a pain it can be… even if you automate much of the process. This jQuery plugin takes all that pain away.

Data Tables

This plugin does everything — filtering, sorting, pagination, editing, column manipulation — with client side or server side processing. The beautiful thing is, if you just want some simple filtering and sorting, it is really, really easy to set up, and the result is gorgeous with almost no effort.


I started playing with this when I was developing an admin area for a directory site. This can give a plain old HTML table superpowers, or at least spreadsheet-like abilities.


Wholly doesn’t filter, sort or page. What it does do, and do well, is highlight table rows and columns in response to mouse movements. If you’ve got complex tables your visitors need to sift through, this makes them beautiful and far more functional than simply shading every even or odd row.


Back in the day, if I wanted an ‘export to Excel’ function on my tables, I’d have to code it. With this plugin, I can better spend that time doing important stuff like watching cat videos.

Making all PDFs Open in a New Window with jQuery

Recently I was faced with a request to make all the PDF documents in a WordPress site open in a new window. Not, to be honest, a task that requires a lot of expertise, but this particular site had hundreds of PDFs linked in widgets and pages, and some generated by plugins.

As I contemplated the work to be done, I shook my head at the task, and the sheer magnitude of the time that this would take. Then I realized that it didn’t have to be any work at all. I was already loading jQuery to run the site’s menu system, so why not put it to work in this too?

I opened the theme footer, and dumped this in a script tag:

 $(function() {
     $('a[href$=".pdf"]').each(function() {
          $(this).prop('target', '_blank');

And suddenly, my work was done, leaving me some extra time to catch up on this season’s Doctor Who.