where to put the bubble?

Hi,

So when I bring up my magic info bubble, how can that code find out where the item is in the window so it can draw the info bubble nearby?

AFAIK there is no rails helper for this, so that leaves us with a pure javascript question. You can get that information in javascript by using the offsetLeft and offsetTop properties of your element. Notice you will have to also take into account the parent offset, available in offsetParent, and you'll have to do it recursively in case that parent has another parent and so on.

If i remember well, just adding your offset to all the parent's offset works fine for both IE and FF (at least), but I'd say there were some issues if you had a scrollable element (no problem with page wide scroll, but with scroll in a div, for example). If you google for those three properties you'll likely/hopefully find some multi-browser script to do that.

good luck,

javier ramirez