JQuery How to Uncheck A radio button
- by user281867
Hi,
I have a list of data with a radio button. Users must select a date to edit. Then I load external dynamic form into a [div] using the jquery load() function.
var ID = $('input[name=BookItem]:checked').val();
$("#EditFormWrapper").load("callEditData.cfm? ID="+ID);
2 Hours AM
2 Hours PM
2 Hours AM
2 Hours PM
I am having trouble uncheck the radio button when user click on cancel button (editBTNcancel). The “BookItem” radio button is on the already on the webpage before the load() call.
Here s my script:
$("#editBTNcancel").live("click", function(event){
event.preventDefault();
$("#EditFormWrapper").slideUp("fast").empty();
//$('.TOR2Hours').removeAttr('checked');
$('.TOR2Hours').attr('checked', false);
});
I hope I clearly state my problem, any suggestion would be greatly appreciated!