jazzle,

You're going to have to code your way out of this one.  Ultimately, you
need to write an onClick or onChange event that looks at the other
checkboxes to see if they are checked, and determine what to do from
there.

Here's a thought (off the top, untested):
$('.noneorone:checkbox').bind('click', function(){
    if ( $('.noneorone:checked').length > 1 && !this.checked ) return
false; // returning false prevents the "click" action, which would
stop the checkbox from being checked.
})

Maybe radio buttons are a better choice for this?  It'll save you some
work.  :)

- Brian


> That title may not make much sense, so here's the code:
>
>   <tr id="<?= $player['id'] ?>">
>    <td><input type="checkbox" name="seventeen[apps][<?= $player['id'] ?>]"
> class="noneorone" /></td>
>    <td><input type="checkbox" name="seventeen[subs][<?= $player['id'] ?>]"
> class="noneorone" /></td>
>   </tr>
>
> I want to be able to select _none or one_ of the checkboxes (note: not
> using
> radio-buttons).
> So I would like to know how to address the _other_ checkboxes (with the
> class noneorone) in the same <tr>.
>
> Do I need some XPath mixed with CSS or what?
>
>
> Thanks in advance for any help.
> --
> View this message in context:
> http://www.nabble.com/Select-_other_-elements-%28with-a-specific-class%29-in-same-tr-tf2958743.html#a8277172
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to