Title says all. Changing this only saves one function call but it saves this call hundreds of times. there is a comment in the jQuery source that assure both are equivalent. It's on the sexy 169 line.
- If a
$(domelement)is used more than once it goes in a variable with a
$domelementname in the closest scope around it,
- removed useless
$()wrapping that were already jQuery objects,
- I fixed two leaking global vars in this patch too (in tabledrag),
- I checked everything but I'm sure sun will end up questioning that ;) be my guest for testing.
If you look closely at the patch you might wonder why
context was passed as an argument to
attachBehaviors instead of
$(context), saving a few thousand useless calls. I'm wondering too.
And tabledrag needs love badly.
This patch will confilct with the other on about changing
.length and most likely the one about
|PASSED: [[SimpleTest]]: [MySQL] 35,409 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 35,362 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1419968-61.patch. Unable to apply patch. See the log in the details link for more information.|
|PASSED: [[SimpleTest]]: [MySQL] 36,162 pass(es).|