I am trying to set a radio button. I want set it by using the value or the id.
This is what I\'ve tried.
$(\'input:radio[name=cols]\'+\" #\"+newcol).
Why do you need 'input:radio[name=cols]'. Don't know your html, but assuming that ids are unique, you can simply do this.
'input:radio[name=cols]'
$('#'+newcol).prop('checked', true);