Play around with this:
$('input[value*="||"]').change(function(){
        var $this = $(this),val = $this.val().split('||')[1];
        if($this.is(':checked')){
                
$this.removeAttr('disabled').siblings('input[value$='+val+']').attr
('disabled','disabled');
        } else {
                $this.siblings('input[value$='+val+']').removeAttr('disabled');
        }
});


What you're trying to do is make checkboxes behave like radio buttons,
so why not just use radios, as they're far more appropriate for
selecting only one of several choices?




On Aug 30, 12:44 pm, "Steffan A. Cline" <stef...@hldns.com> wrote:
> I have a form of data I am working on where I may have *nearly* the same
> thing appear with a checkbox appear multiple times.
>
> For example:
>
> <input type="checkbox" name="blah" value="widget1||123456">
> <input type="checkbox" name="blah" value="widget2||123456">
> <input type="checkbox" name="blah" value="widget3||123456">
> <input type="checkbox" name="blah" value="widget4||123456">
> <input type="checkbox" name="blah" value="widget5||123456">
>
> So, if checkbox #1 (widget1) is checked, it will either disable all other
> ones containing the sku 123456 OR replace the others in the form having sku
> 123456 with an image of a sort.
>
> Is there a way to select this without iterating through every checkbox in
> the form and looking at it's value?
>
> Thanks
>
> Steffan
>
> ---------------------------------------------------------------
> T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
> Steffan A. Cline  
> stef...@execuchoice.net                             Phoenix, 
> Azhttp://www.ExecuChoice.net                                 USA
> AIM : SteffanC          ICQ : 57234309
> YAHOO : Steffan_Cline   MSN : stef...@hldns.com
> GOOGLE: Steffan.Cline             Lasso Partner Alliance Member
> ---------------------------------------------------------------

Reply via email to