When clicking a checked Radio button it raises a change event
Created by: hokkos
Hi, it appears that when we click a checked radio button it raises a change event when it shouldn't, you can test here : http://jsfiddle.net/hQQPH/2/ here is the html :
<div class="btn-group btn-group-lg" data-toggle="buttons">
<label class="btn btn-primary" for="test2_t" >
<input type="radio" name="test2" id="test2_t" value="true"/> 3
</label>
<label class="btn btn-primary" for="test2_f" >
<input type="radio" name="test2" id="test2_f" value="false"/> 4
</label>
</div>
and the javascript :
$('input[type=radio]').change( function() {
alert("test");
});
thanks.