> It is shorter, but it just doesn't seem quite as jQuery-ish. ;)

I always figured that there was a good reason for the "this" object
being a bare DOM object in callbacks, events, and .each loops. jQuery
doesn't try to hide the DOM, but it's just a $(this) away when you
really need it.

If you prefer the jQuery methods, you can still get a one-liner:

$("#"+$(this).attr("class"))[$(this).is(":checked")?"show":"hide"]();

Reply via email to