This code executes perfectly in safari and chrome but has problems with Firefox.
Basically, I have a group of radio buttons. This click event should only be fired if the radio button has an attribute of checked. However for some reason, the radio button in firefox seems to fire the event even when the radio-button is not checked.
var MyView = Backbone.View.extend({
events: {
'click input[type="radio"]:checked' : 'radioListener',
},
radioListener : function(evt) {
var selectedObject = evt.currentTarget;
$(selectedObject).prop('checked', false);
$(selectedObject).val('');
$(selectedObject).change(this.clearSelection(evt));
}
});
Aucun commentaire:
Enregistrer un commentaire