Is there a way to track when a radio element gets deselected?
<script type="text/javascript">
$().ready(function() {
$('#answer-1').change(function(){
console.log('radio-1 changed');
});
$('#answer-2').change(function(){
console.log('radio-2 changed');
});
});
</script>
<input name="question-1" type="radio" id="answer-1" />Value
<input name="question-1" type="radio" id="answer-2" />Value
Expected result: When selecting answer-1, it shows event ‘radio-1 changed’, then when switching to answer-2, it should show radio-2 changed AND radio-1 changed
Actual result: When selecting answer-1, it shows event ‘radio-1 changed’, then when switching to answer-2, it shows only ‘radio-2 changed’
Is there a way to get events when the radio’s get DEselected?
you can use
.datahere is the fiddle that may help http://jsfiddle.net/wZ73z/19/