I just made a very major edit to an answer - current version (my edit) | previous revision. My rationale for editing, instead of posting a separate answer, is that the code/plugin in question is that same and that the previous version of the answer, among other things:
- was extremely verbose, containing a code dump;
- contained copied code that's old and quite possibly broken;
- is no longer the best way of doing things as the code in question has been made into a jQuery plugin available on GitHub.
Was my edit justified, or should it have been an answer all of its own?