So i have this code
<ul id="id_priori">
<li>
<label for="id_priori_0">
<input id="id_priori_0" name="priori" type="radio">Hola
</label>
</li>
</ul>
And this code
$("#id_tipo").on('click', 'li', function () {
var self = $(this),
radio = self.find(":radio")[0];
radio.checked = !radio.checked;
self.toggleClass('on', radio.checked);
})
.find(":radio").each(function () {
$(this).closest('li').toggleClass('on', this.checked);
});
What i want is to unclass all the labels whose radio's arent checked , any idea ?