user1802327
user1802327

Reputation: 91

ToolTip on button click

I need to show a tooltip onClick (Instead of hover) and it should fade out after 200ms

Any help ?

Upvotes: 3

Views: 1071

Answers (2)

David Czinege
David Czinege

Reputation: 529

I usually use this jQuery-plugin:

TipTip 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

Nikhil Baliga
Nikhil Baliga

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

Related Questions