Right...

I admit it's not the best, but I wanted to see about that possibility so as
to change as little code as possible.

I ended up giving each select it's own unique ID and of course that works
just fine. 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Wednesday, May 23, 2007 2:26 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Question about the context attribute of a jQuery call


The OP has a case where there are two forms, each with its own ID, however,
the elements of each form are the same so there are duplicate ID's.

Perhaps this is not the best design pattern, and class or name could be used
for selection rather than IDs.  Or, set it up so the IDs are not duplicated.

-- Josh


----- Original Message -----
From: "Daemach" <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Wednesday, May 23, 2007 11:46 AM
Subject: [jQuery] Re: Question about the context attribute of a jQuery call


>
> I think you can use a selector in a context attribute, but there isn't
> much point in this situation.  If all of your ID's are unique (and
> they should be), $('#make') is enough.  You don't need a context.
> When you use the #, it's the same as doing document.getElementByID();
>
> On May 23, 11:19 am, "Sean Catchpole" <[EMAIL PROTECTED]>
> wrote:
>> > $('#make','#redlineSelect').click( do something here)
>>
>> It's invalid to have a string as the second parameter to jQuery. Try
>> this instead:
>> $("#redlineSelect #make").click(...);
>>
>> ~Sean
> 


Reply via email to