I need to show a tooltip onClick (Instead of hover) and it should fade out after 200ms
Any help ?
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
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.
titleattribute then it's not possible, you will need to write your own javascript/jquery library or use ready solutions like qTip or something else (just search for them online, there are plenty)