The Simplest jQuery Tooltip Ever

What this script does is adds an element to the body when you roll over a certain object. That element’s appearance is predefined with css (positioned absolute and styled) so all we need to do is fill the element with content, calculate mouse position and make it move accordingly. When cursor is moved over he object, element moves with it and when cursor roll out, the element is deleted.

The script takes a title attribute of an A tag and place it inside the popup element.
Html looks like this:

Roll over for tooltip

Be Sociable, Share!

Leave a comment