In my html template I've got a label with an input radio inside:
<label id="myid" class="inline">
<input type="radio" value ="11">
my text
</label>
I need to change the text of the label with jquery. I tried this:
$('#myid').html('my new text');
or
$('#myid').text('my new text');
but when I do that I lose my input radio. How can I preserve the input radio inside the label and modify label's text?
$('#myid input').get(0).nextSibling.nodeValue = 'my new text';
– Lupus