I try to check a radio button with jQuery. Here\'s my code:
I'm sorry for English.
var $j = jQuery.noConflict(); $j(function() { // add handler $j('#radio-1, #radio-2').click(function(){ // find all checked and cancel checked $j('input:radio:checked').prop('checked', false); // this radio add cheked $j(this).prop('checked', true); }); });
Radio buttons Option one is this and that—be sure to include why it's great Option two can be something else