I'm working on a pretty basic show/hide script and am basing it on which of the two radio buttons below are checked. My problem is that I can't add id's to the radio buttons, as the code is dynamically generated. Is there any way using JQuery to select which box is checked based on the combination of the name and value? Once I have that IF statement I can handle the rest, but I only know how to do it using classes or ID's.
<span class="wpcf7-form-control-wrap mysql">
<span id="mysql" class="wpcf7-form-control wpcf7-radio radiobuttons">
<span class="wpcf7-list-item">
<label>
<span class="wpcf7-list-item-label">Yes</span>
<input type="radio" name="mysql" value="Yes">
</label>
</span>
<span class="wpcf7-list-item">
<label>
<span class="wpcf7-list-item-label">No</span>
<input type="radio" name="mysql" value="No">
</label>
</span>
</span>
</span>
So basically I am looking for something like "if the name is mysql, the value is Yes, and the radio button is checked, do X. If the name is mysql, the value is No, and the radio button is checked, do Y.
Thanks in advance.