Javascript 向导单选按钮已选中“不工作”和“发布”?

Javascript 向导单选按钮已选中“不工作”和“发布”?,javascript,input,checked,Javascript,Input,Checked,我没有从选中的类中获取数据-单选按钮未发布 实例: 所有代码jQuery: $('[data toggle=“wizard radio”]')。单击(函数(){ wizard=$(this).closest('.wizard-card'); wizard.find('[data toggle=“wizard radio”]')。removeClass('active'); $(this.addClass('active'); $(向导).find('[type=“radio”]')。remove

我没有从选中的类中获取数据-单选按钮未发布

实例:
所有代码jQuery:

$('[data toggle=“wizard radio”]')。单击(函数(){
wizard=$(this).closest('.wizard-card');
wizard.find('[data toggle=“wizard radio”]')。removeClass('active');
$(this.addClass('active');
$(向导).find('[type=“radio”]')。removeAttr('checked');
$(this.find('[type=“radio”]').attr('checked','true');
/*我的代码*/
$(“输入”)。在(“单击”,函数()上{
$(“#log”).html($($(“输入:已选中”).val());
});
尝试更换

$(wizard).find('[type="radio"]').removeAttr('checked');
$(this).find('[type="radio"]').attr('checked','true');
用这个

$(wizard).find('[type="radio"]').prop('checked', false);
$(this).find('[type="radio"]').prop('checked',true);