This post originated from an RSS feed registered with Ruby Buzz
by Jonathan Weiss.
Original Post: tooltip.js - version 0.2
Feed Title: BlogFish
Feed URL: http://blog.innerewut.de/feed/atom.xml
Feed Description: Weblog by Jonathan Weiss about Unix, BSD, security, Programming in Ruby, Ruby on Rails and Agile Development.
The new version follows the mouse correctly on Firefox (thanks to Graham TerMarsch) and can apply a constant delta when displaying the tooltip. This can be useful if your CSS rules include absolute positioning that can result in a constant offset.
var my_tooltip = new Tooltip('id_of_trigger_element', 'id_of_tooltip_to_show_element',
{ delta_x: -210, delta_y: +20 })
Another nice addition (by Xavier Lepaul) is the ability to create tooltips out of given text. Version 0.1 required you to give it the DOM id of a valid element. Version 0.2 will create a div with the class tooltip if it is given only text:
var my_other_tooltip = new Tooltip('id_of_trigger_element', 'a nice description')
This can be used to create popups out of title attributes: