i have this html code:
<label class="checkbox" id="check_rem0">
Checkbox
<input type="checkbox" disabled="disabled" id="form_checkbox_0">
</label>
is there a way to replace only the text in the label, Checkbox in my case, withowt removing/replacing the input?
if i do $('.checkbox').text('Anoteher Checkbox') i will get:
<label class="checkbox" id="check_rem0">
Anoteher Checkbox
</label>
Also, i don’t necessarily know what text will be there.
Don’t nest your input inside your label. Associate the two with
<label for="form_checkbox_0">. That way you can manipulate the text as much as you want.