I'm running into a few issues with the position utility, which seem to be amplified when trying to show an element with an effect right before positioning it.
I've put some tests together @
http://jsfiddle.net/AsA24/ which demonstrate the following, given an element that is absolutely positioned:
1. In Webkit & IE, it takes two position() calls to position the element correctly when default top and left values are not provided. Firefox 3.6 is OK.
2. If left & top are both pre-set to 0 in CSS (or calling .css() prior to position()), position() works as it should.
3. When showing a hidden element with show(effect, speed) and then calling position() on it, the element is not correctly positioned when default top and left values are set. If you remove the default top and left values, it works fine. So basically, if you're using show() with an effect there can't be default top/left values, but if you are using an effect, there needs to be.
4. Placing the call to position() in the callback of show(effect, speed, callback) doesn't seem to work, because the callback doesn't even appear to fire?
Another issue I'm having which I wasn't able to replicate in fiddle, is when an element is flipped from "bottom" to "top", there is a 20px gap or so between where the element is and where it should be. I need to click twice to correctly position the element... but I'll have to throw a test case together for that one.
I really haven't spent much time on this and haven't tested outside the fiddle. I know that the element is suppose to be visible before positioning it, but are there other stipulations to be aware of? I'm developing a widget that can be opened/closed using animations (as a parameter), and as you can imagine I'm having a lot of difficulty covering all the use cases with these quirks.
thanks in advanced