I filed a bug and submitted the corresponding patch:
http://dev.jquery.com/ticket/5172
comments are welcome.
On Sep 6, 11:30 pm, lrbabe wrote:
> Unfortunately it doesn't work like that in the latest nightly.
> What is causing the most confusion is that the three following queries
> do not produ
Unfortunately it doesn't work like that in the latest nightly.
What is causing the most confusion is that the three following queries
do not produce the same context:
$("div", document.getElementById("myId"));
$("div", $("#myId"));
$("div", "#myId");
Actually, only the first one result in the el
It seems fairly trivial to add some sort of 'query optimizer' so a call
like $('#listing .list_item') will be rewritten to $('.list_item', '#listing').
It seems like you could basically split on the space (won't that always
work?)... but at the very least calls that contain an ID should be able to
Requiring context is a good performance rule to use for pages with
tons of nodes. However, I didnt see a performance difference between
providing a string or an object as the context. Perhaps your argument
to throw an exception if a string is provided was for convention only,
in which case it's
Few months ago we discussed here this very point.
Also ... for my team I introduced jQuery.strict = true; // or false
If it is true then context must be given and it *must* be a valid dom
node.
Otherwise an exception is thrown.
This change was added to the jQ code. After 2 days of mad exception
fi
No. I think the point is that the two are equally efficient, a fact
which had initially been obscured.
On Aug 18, 4:05 am, Samer Ziadeh wrote:
> oh so if i do this would it be ineficient?
>
> var $content = $('#content');
> $('.posts', $content);
>
> and i should be doing this instead?
>
> var
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 wrote:
>
> Thanks for clarifying this. The very same section in Bra
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
wrote:
> Thanks for your reply John. :)
>
> On Aug 14, 1:24 pm, John Resig wrote:
>
> > > That can't be true, right? It d
Thanks for your reply John. :)
On Aug 14, 1:24 pm, John Resig 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",
> 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 mai
10 matches
Mail list logo