Why is appended radio button is not clickable?
I have done a small mistake in my code that is not allowing me to click on the appended radio button.
var ToBeRadio=NoneElementsArray[i]*1-1;
$(this).children('td:eq('+ToBeRadio+')').find('input:checkbox').hide();
$(this).children('td:eq('+ToBeRadio+')').append("<input type='radio'>开发者_开发知识库");
Where's the error?
You need to give your input type a name attribute. Your code should be similar to:
var ToBeRadio=NoneElementsArray[i]*1-1;
$(this).children('td:eq('+ToBeRadio+')').find('input:checkbox').hide();
$(this).children('td:eq('+ToBeRadio+')').append("<input name='myRadios' type='radio'>");
精彩评论