What is the difference between $(\"*\", $(\"#container1\"))
and $(\"#container2\").find(\"*\")
?.
I usually use AA, but not well in that case can be mo
When used properly, the context selector is no different from find. Resig has stated that he dislikes the context selector and would prefer people use .find(), since it makes more sense semantically.
There's a lot of ways to screw up context; for example, passing a string does not work and causes the selector to default to parsing the entire document. I'm fairly sure your example is using the context correctly (no time to test), but again, using .find() beats this uncertainty.
I believe the context selector must implicitly call find() itself.
Best to just use find() for simplicity.
EDIT: source code from 1.3.2:
// HANDLE: $(expr, [context])
// (which is just equivalent to: $(content).find(expr)