I’m using this code to make checkboxes act like radio buttons. What can I add/change so when a checked box is clicked on it’ll uncheck?
http://jsfiddle.net/peter/4Awf9/
$(".radiounique").click(function() {
$(".radiounique").removeAttr('checked');
$(this).attr('checked', true);
});
<input type="checkbox" class="radiounique" value="3">
<input type="checkbox" class="radiounique" value="4">
<input type="checkbox" class="radiounique" value="2">
<input type="checkbox" class="radiounique" value="1">
If you want it to act like the radiobuttons –
can try –
Fiddle – http://jsfiddle.net/4Awf9/1/