I have group checkboxes and I like if this group have behaviour like radiobuttons with same name atribute.
Each checkbox has different name.
Only one can be
Pablo's answer works great if you only have one set of these on your page. I came across this when attempting to workaround a bootstrap implementation that was giving me some trouble because radio buttons had been completely overwritten and it turns out it will be easier to just use the checkboxes as radio buttons.
Here's a version of this code that allows multiple sets by referencing the calling element's second class.
$('input.unique').each(function() {
$(this).on('touchstart click', function() {
var secondClass = $(event.target).attr('class').split(' ')[1];
$('input.' + secondClass).not(this).removeAttr('checked');
});
});
JSFiddle