I've been seeking a solution to a request that's come up a few times with clients now, and have been forced to offer them an alternative.

Basically, what's been requested is similar to a tooltip: it appears when you hover over something, and it follows the mouse cursor within the confines of that area. Sounds like any tooltip script, right? Indeed, I've found loads of them.

The problem is that they want a relatively complicated assortment of HTML in the tooltip, which I've produced. At the moment this sits as <divs> on the page, hidden with 'display: none;'. I've come up with a way of making them appear in a pre-defined location upon hover, but not in a way that follows the cursor.

Can anyone think of a standards-compliant tooltip script that either does or can be easily bent to accommodate full-blown HTML, rather than simply a line or two of text as most allow (typically defined in the 'onmouseover' itself, which is no good for search engines)?

The best solution of all would be for it to literally take my hidden <div> and apply it to the cursor, but I can't hard code this into the script itself as there're multiple instances of them on the same page.

Hopefully someone can at least put me on the right track, because Google isn't really helping me cut through the abundance of generic tooltip scripts out there which all accomplish pretty much the same thing.