0
I have this radio button and would like to change the text of radio button "All" for yes, depending on the condition:
<label id="radiotodos" class="radio-inline control-label">
<input type="radio" name="optradio" value="3">Todos
</label>
But when I do so:
$("#radiotodos").html("Sim");
It doesn’t work, it changes to yes, but the radiobutton, I’ve tried changing the id, but it doesn’t work.
what do you want to do exactly? by clicking on this radio button change all other radios Buttons to YES?
– Ricardo
Have you tried
$("#radiotodos").text("Sim")– Azzi
You’re getting the value of
label, this way will not work. You must take the value ofinputand trade, something like$("#firstopt").prop("checked", "true"). Doing so, the option will be checked.– Jakson Fischer
@Azzi tried, but the
radiobuttonvanish and there’s just yes.– Mariana
@Ricardo I already have the condition, I need that when he enters the condition, he change the text to Yes.
– Mariana
@Jaksonfischer I don’t mark it, I want to change the label, the text.
– Mariana
Ahh, right, got it now... Well this way it will work as @Ricardo’s example below
– Jakson Fischer