jQuery Offset in Core
jQuery Offset in Core
Hi Everyone -
I landed the Dimensions' .offset() method into core today, with a ton
of help from Brandon. My primary justifications for doing so were:
1) To remove a common dependency for most plugins, including, most
notably, jQuery UI.
2) To centralize the development of one of the most commonly used plugins.
The file size hit is rather small (comparatively) - currently about +900b.
Now, I integrated it into the build system and ran it against some
jQuery UI demos, but then I hit a snag. A vast majority of jQuery UI
plugins look for other methods that are included by Dimensions
(.position() and .outerWidth(), for example) - thus removing the most
important reason of including .offset() (since you'll have to include
Dimensions, regardless).
So, I'm stuck right now. I've backed it out of the build process, but
it's still in jquery/src/. I'm not sure what the right step is, going
forward. Ideally, I want to be able to run jQuery UI without the need
for Dimensions (which is what I was hoping for with offset.js). Is
this possible? and more importantly: Is this possible by tomorrow?
Honestly, I'm not sure if it's possible - and if that's the case, I'd
like to hold off on automatically including it in the builds until we
can figure out how it would be best used. Any input on this matter
would be greatly appreciated.
--John