Sorting Tables

Published in Programming and Scripts on Friday, November 19th, 2004

Table sorting via javascript - an old but very useful link (?) brought back to life by necessity.

Get sorted

Well, I knew this function existed somewhere in the back of my head because I knew to search for it. It did the rounds some time ago but it was so easy and useful that I thought what the heck, post it again.

Stuart Langridge, a year ago, posted sorttable: Make all your tables sortable, a javascript function that unobtrusively makes your tables sortable. Simple, clean, just drop and go. Thanks Stuart!

Even more good stuff

Dig into other bits on his site:

Comments and Feedback

Neat function, very well documented by Stuart. Thanks for the heads up Mike.

Anytime Jonathan!

Nice to see the increased posting on your blog, btw; makes up for those of us who've been slacking ;-)

Don't get too used to it. I probably won't be able to sustain it. :-(

Good stuff from one of the developers of my favourite image replacement trick, although his DOM-foolery should really come with a disclaimer: "All the above will directly contravene WCAG guideline 6.3".

Nice! Shame the first thing i test it on has rowspans and it gets munched :(

Woah, that so rocks! I'll think of this next time I use a table!

Home » Blog » Web Development » Programming and Scripts

Check out the blog categories for older content

The latest from my personal website,

SiteUptime Web Site Monitoring Service

Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:

The Principles Of Successful Freelancing

I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.

The Art & Science Of JavaScript

The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks

Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..