I have 3 radio buttons with attached callback:
$('#formBuilding input[type="radio"]').change(projectChangeHandler);
In callback projectChangeHandler I access radio value with:
var currentSelection = $('#formBuilding input:radio:checked').val()
In IE 7, unlike to other browsers, currentSelection has value from radiobutton which has been unselected. In other browsers, currentSelection has value from radiobutton which was clicked (or gained focus).
How to solve it to be crossbrowser?
Thanks Paweł
For radio buttons, you should use the click event. Although it may sound strange, but the click event will also fire when selecting the radio button with the keyboard, so there are no issues with accessibility.