Did you know that you can pass params into the .position() method?
I thought I knew jQuery super well. But I was surprised to discover that you can pass params into the .position() method. All along I thought you would use this method to simply get the position of an element, relative to it's parent. Then I stumbled into this link, which shook up my world.
I looked at the API docs for jQuery and did not see the params. But when I looked in the docs for jQueryUI, I found it (it would be nice if it was mentioned in the standard docs that the method was enhanced in jQueryUI).
Anyway, the params allow you to have pretty good control over the position of the target. Rather than try to explain it myself, I'll just proved the link to the docs in jQueryUI.