I have this code to check/uncheck a radio button onclick.
I know it is not good for the UI, but I need this.
$(\'#radioinstant\').click(function() {
This function will add a check/unchecked to all radiobuttons
jQuery(document).ready(function(){
jQuery(':radio').click(function()
{
if ((jQuery(this).attr('checked') == 'checked') && (jQuery(this).attr('class') == 'checked'))
{
jQuery(this).attr('class','unchecked');
jQuery(this).removeAttr('checked');
} else {
jQuery(this).attr('class','checked');
}//or any element you want
});
});