[jQuery] Re: Combining jQuery Objects

2009-07-27 Thread Neilski

Thanks Ricardo, that was exactly what I was looking for - just in the
wrong place I guess!

On Jul 23, 10:19 pm, Ricardo  wrote:
> Guess what?
>
> var e1 = $("#firstObject");
> var e2 = $("#secondObject");
>
> e1.add( e2 ) is exactly what you're looking for :)
>
> http://docs.jquery.com/Traversing/add#expr
>
> On Jul 23, 1:17 am, NeilM  wrote:
>
> > Does anyone know if it is possible to join two jQuery objects to make
> > a new object.  For example...
>
> > var e1 = $("#firstObject");
> > var e2 = $("#secondObject");
>
> > var combined = e1.add(e2);  // This is the expression I'm looking for
>
> > Thanks.


[jQuery] Re: Combining jQuery Objects

2009-07-23 Thread Ricardo

Guess what?

var e1 = $("#firstObject");
var e2 = $("#secondObject");

e1.add( e2 ) is exactly what you're looking for :)

http://docs.jquery.com/Traversing/add#expr

On Jul 23, 1:17 am, NeilM  wrote:
> Does anyone know if it is possible to join two jQuery objects to make
> a new object.  For example...
>
> var e1 = $("#firstObject");
> var e2 = $("#secondObject");
>
> var combined = e1.add(e2);  // This is the expression I'm looking for
>
> Thanks.


[jQuery] Re: Combining jQuery Objects

2009-07-23 Thread Kuo Yang
Do you mean append()  or  appendTo() ?

On Thu, Jul 23, 2009 at 12:17 PM, NeilM  wrote:

>
> Does anyone know if it is possible to join two jQuery objects to make
> a new object.  For example...
>
> var e1 = $("#firstObject");
> var e2 = $("#secondObject");
>
> var combined = e1.add(e2);  // This is the expression I'm looking for
>
> Thanks.
>