Reputation: 91
I need to show a tooltip onClick (Instead of hover) and it should fade out after 200ms
Any help ?
Upvotes: 3
Views: 1071
Reputation: 529
I usually use this jQuery-plugin:
Here is an example HTML code:
<img class="example" src="example.jpg" title="Example text" />
You can customize the tooltip like this:
$(document).ready(function(){
$(".example").tipTip({activation: "click"});
});
The tooltip will appear when you click on the image, but it will disappear only when you mouse out the image.
Upvotes: 0
Reputation: 1341
I would like to suggest the Twitter Bootstrap library - It has all that you want, and has been implemented very neatly http://twitter.github.com/bootstrap/javascript.html#tooltips
Upvotes: 1