I just pushed out Tooltip.js 0.5.0. I had planned to release 0.4.0 tonight, indeed I had written the ChangeLog? and tagged the release…
Then I went Ego Surfing, and someone mentioned the ability to choose the activator using a special “for_$id” class, for example, code="tooltip for_link" would point to the element with id="link". If the script cannot find said element, it automatically falls back to the original previousSibling behavior.
I also added the ability to set the callbacks for the show/hide events, so you can easily swop-out the Effect.Appear and Effect.Fade script.aculo.us effects.
The ChangeLog for 0.4.0 and 0.5.0 is this:
Version 0.5.0 * It is now possible to set a callback method for the show and hide events, set Tooltip.showMethod and/or Tooltip.hideMethod * Adding “for_” followed by an element ID to the “class” attribute will allow you to bind a Tooltip to any element in a page Version 0.4.0 * Make sure only events registered for show/hide do just that, rather than toggle regardless of which event they were registered for.