Is there an easy way to attach a \"deselect\" event on a radio button? It seems that the change event only fires when the button is selected.
HTML
&l
I think you need to add the change function on the input level, rather than on each radio button.
Try this:
$("input[name='a']").change(function() { $("input[name='a']").each(function(){ if(this.checked) { // do something when selected } else { // do something when deselected } }); });