There’s no need to explain what a tooltip is and you already know that using tooltips can help you increase usability. Therefore, in this article we’ll concentrate just on the practical side.
So, today you’ll learn how to create awesome CSS3 & jQuery tooltips.
As you can see below, thanks to the new HTML5 custom data attributes, our tooltip structure looks as clean as possible:
The CSS
Here are the styles used in order to create this 3D looking tooltip:
The jQuery
Basically, the jQuery code does all the “dirty” job for you. Using the HTML5 data-tooltip attribute value, it appends a new HTML node: <span class="tooltip-content"> which will be animated using CSS3.
IE6 gets some extra treatment, as you can see above.
Browser support
As usual, this demo also works across all major browsers:
That’s all
I hope that you enjoyed this tutorial and if you have any comments or questions feel free to add them below. Thanks for reading!