Ariel,
Here is another version for mouseenter and mouseleave which expands
further on your changes... It makes the withinElement function the
actual handler, which is shared by both events.
about 422 bytes minified:
http://codepad.org/umk28Ihxreplaces 952 bytes of minified code:
http://codepad.org/DSUFAlJRAs far as calculating file size... I also used dean edwards packer,
but not the variable compression option, because my understanding of
gzipping is that it recognizes patterns in the code agnostic of
structure, so things like "jQuery" and "jQuery.event" are going to get
compressed as they are used multiple times. Using an alias variable
for "jQuery" in the core would save loads of bytes in the short term
and in packing, but I assume not fair as well in gzipping... hence,
"packed" code does not compress as well as "minified" code.
And as for making the handler exposed or not, makes no difference to
me, I was just trying to be consistent with the way these functions
were originally written.
http://dev.jquery.com/ticket/3127-mike