oh so if i do this would it be ineficient?
var $content = $('#content');
$('.posts', $content);
and i should be doing this instead?
var content = $('#content')[0];
$('.posts', content);
On Mon, Aug 17, 2009 at 14:30, ajpiano <[email protected]> wrote:
>
> Thanks for clarifying this. The very same section in Brandon's post
> had me confused, and also had me writing $(".these",$those[0])
> since.
>
> On Aug 16, 4:46 am, James Padolsey <[email protected]>
> wrote:
> > Thanks for your reply John. :)
> >
> > On Aug 14, 1:24 pm, John Resig <[email protected]> wrote:
> >
> > > > That can't be true, right? It doesn't "search the whole doc".
> >
> > > Correct, it only searches the limited sub-set.
> >
> > > > The "context" property may be "document" but ".myClass" is only
> > > > searched for within "#myContainer", right? (this is how I see it,
> > > > after looking at the source)
> >
> > > > I think the main reason people (including me) are confused is because
> > > > the "context" property does not correspond with the "context"
> > > > parameter. I'm not too bothered about it but it seems to be causing
> > > > confusion elsewhere.
> >
> > > Correct - regardless of what's passed in as the context argument, it
> must be
> > > translated into a single DOM node, which will act as the root against
> > > queries will be executed. This node is what is stored in .context.
> >
> > > --John
> >
> >
> >
>
--
Samer Ziadeh
www.samerziadeh.com
"Let It Be"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---