As usual, the script goes into the domready portion of the page.
Mouseover this or this for a demo.
On an input field:
Usage for this page:
window.addEvent("domready", function() {
$$(".tipster").addEvents({
mouseenter: function() {
this.store("msg", this.get("title")); // get title
// remove default title behaviour once moved into tooltip
if (this.retrieve("msg")) this.set("title", "");
//if no title, use a random one...
this.tooltip(this.retrieve("msg") || ["Nice tips", "Wow, this works", "Amazing... not."].getRandom());
}
});
});