When using bigger top offset with jquery ui position method, I get wrong results.
It's hard to describe but I've created a fiddle here:
As soon as the top offset reaches a certain value, the offset result gets inverted.
Just a snippet of the JSFiddle:
my: "left-228 top-" + topOffset,
at: "left top",
It's because of the
fitmode. The jQuery UI position utility has an intelligent collision detection system that will position the element based on its proximity to the edges of its container, so once it gets too close to one edge, it will flip the position (which is why you see the inversion) to try and fit it better
collision option in the API docs