HTML:
<a href="#" rel="tooltip">Open Tooltip</a>
<div id="tooltip">Tooltip Content</div>
I checked out some tooltip plugins but my requirement is a really basic tooltip that shows a hidden div on hover. All plugins either have too many advanced options that I don’t require and have already styled tooltips that might be difficult to modify.
I’d appreciate any help. Thanks.
You can roll your own.
My suggestion is just to store the
clientXandclientYproperties of the mouse event object that is passed to theonmouseoverevent handler. Then set the CSS onscreen position (left,top) of the hidden div to those coordinates and you’re golden. Make sure that the div’spositionCSS property isabsoluteA quick untested example just to give you an idea: