<input type="checkbox" name="Rates" class="RatesClass">Rates & Fees<br />
How can I change that text Rates & Fees dynamically, using Jquery?
Thanks!
How about this one that doesn’t have a class defined?
<input type="checkbox" id="Value" name="Values">Values<br />
EDIT:
<input type="checkbox" id="RatesFees" name="Rates" class="RatesClass">Rates & Fees<br />
<input type="checkbox" id="RatesOnly" name="RatesSpecific" class="RatesClass">Rates (All-In-Rate Only)<br />
The simplest will be to unwrap the
inputDOM element from the jQuery object, and use the nativenextSiblingproperty to get the text node, then update its value withdata.If you’re in an event handler, you’d just use
thisto refer to the element.