Link to home
Start Free TrialLog in
Avatar of erzoolander
erzoolander

asked on

JQuery Make Input Inactive based upon class value

I have a number of input fields like this...

<label>
    <input onchange="checkvals()" name="Segment_" value="OL" id="Segment_8" type="checkbox">
    Ocean Line (<span id="ms9" class="detect">0</span>)</label>


What I'd like to do is have JQuery scan across all input fields that contain that span class, and if 0, disable the input (and conversely, if greater than 0, ensure that it's *not* disabled).

What would the syntax for that be?  :)
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of erzoolander
erzoolander

ASKER

Gracias!