This question already has an answer here:
I do not know why the onchange function does not trigger if I Switch the Radio Buttons.
I only get the console message if I click on each Radio the first time, but after switching the Radio I do not the a console Output.
var drawingArrow = document.getElementById('drawing-arrow-shape'),
drawingCircle = document.getElementById('drawing-circle-shape'),
drawingCircle.onchange = function() {
console.log("on change circle btn");
};
drawingArrow.onchange = function() {
console.log("on change arrow btn");
};
<label class="btn btn-default btn-lg">
<input type="radio" name="drawing-arrow-shape" id="drawing-arrow-shape">
<i class="glyphicon glyphicon-arrow-right"></i>
</label>
<label class="btn btn-default btn-lg">
<input type="radio" name="drawing-circle-shape" id="drawing-circle-shape">
<i class="glyphicon glyphicon-record"></i>
</label>