Using JQuery, is there a simple way to select the text immediately after a checkbox?
<li>bleh..</li>
<li>
<input type="checkbox" id="cbx1" value="10" /> Very important text.
</li>
<li>bleh..</li>
I want to use jquery to select that “Very important text.” minus
Better solution might be to wrap the text in a
labelelement:You can then get the text like so:
This also improves the semantics of your document.