I needed a tri-state checkbox for a client's project and didn't find much on the web that I thought was suitable. The one at http://shamsmi.blogspot.com/2008/12/tri-state-checkbox-using-javascript.html was close, but the Javascript was unnecessarily complex (although he may have been trying to avoid framework dependencies). As far as I'm concerned, jQuery is Javascript.
I have shamelessly stolen the images in Shamsmi's package and wrote this simple plugin.