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).
The chosen answer works in this case.
But the question was about finding the element based on radiogroup and dynamic id, and the answer can also leave the displayed radio button unaffected.
This line does selects exactly what was asked for while showing the change on screen as well.
$('input:radio[name=cols][id='+ newcol +']').click();