Not only would you not want to, but it wouldn't matter. If the elements
set to fixed it will do nothing to set it's top and left properties.

Your snippet might work for setting the position, but for the other
functions like centering the element in the window, and the fromX
functions it must be absolute. I'd also like to add to it,

offsetFromElement(e, x, y)
offsetFromMouse(x, y)

This would be a major convenience function for generating tooltip like
items, or other contextual windows. Again I've run against this a few
times in recent projects and it's a real pain to try out these
interactions when it takes a lot of work.

Reply via email to