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() {
$(document).ready(function(){ $("input:radio:checked").data("chk",true);
$("input:radio").click(function(){ $("input[name='"+$(this).attr("name")+"']:radio").not(this).removeData("chk"); $(this).data("chk",!$(this).data("chk")); $(this).prop("checked",$(this).data("chk")); });
});