So in general my recommendation was to not use the context argument for any perf advantage, I only see it useful as a shorter way of writing $(this).find(…
But Yehuda Katz mentioned that it has a decent use in live() in jquery 1.3.3:
$("td", "table").live(…
will scope the delegation to existing tables
I have yet to do some performance testing on this. But this may be worth considering.
Paul, thanks for a fascinating presentation. I wish I could have heard you too. I'm just getting into jquery so it was illuminating. It brought back some of my best programmer's instinct. :)
will not be scoped to tables, because the context of the resulting jQuery object is still the document. To change the context you have to pass an actual DOM node.
Nice presentation dude. Great slides.
Wish I coulda been there to see it in person!
Big Loada!
Thanks for nice slides. Nice tip/trick on slide 36…in need of this right now. :)
too bad I couldn't be there :'(
@Pablo, Hah! thank you for getting the reference. :) Craig David and Squarepusher ref's on a talk about selectors is just.. a must do!
So in general my recommendation was to not use the context argument for any perf advantage, I only see it useful as a shorter way of writing $(this).find(…
But Yehuda Katz mentioned that it has a decent use in live() in jquery 1.3.3:
$("td", "table").live(…
will scope the delegation to existing tables
I have yet to do some performance testing on this. But this may be worth considering.
Paul, thanks for a fascinating presentation. I wish I could have heard you too. I'm just getting into jquery so it was illuminating. It brought back some of my best programmer's instinct. :)
…and I've picked up your RSS feed!
Great presentation Paul! My fav slide is #54 — All that expression'y goodness! :D
@Paul:
will not be scoped to tables, because the context of the resulting jQuery object is still the document. To change the context you have to pass an actual DOM node.
I think we're going to be seeing a lot of code like this when v1.4 hits the shelves:
Prestaul, you are 100% correct.
This definitely lends to some odd looking code, but yah right now that's the best way…
Very-very nice and usefull. I take couple of your recepies. Thank you.
This is a great presentation. Thanks!
Looks like the slides are down :(