following structure:
<label class="selectit">
<input value="3" type="checkbox" name="tax_input[event_type][]" id="in-event_type-3">
Workshops
</label>
I can easily do that to find out if the checkbox is checked …
if ( $('#in-event_type-3').attr('checked') ) {
Is there also some way to use a selector where I can put in “Workshops” to select the checkbox? The problem is that the id of the checkbox is generated dynamically and changes from time to time. The label-text “Workshops” however is set by me and I wonder if I can somehow write a selector that uses this “Workshops” string to select the checkbox?
Any ideas on that?
Try the
:containsselector: