I\'m using a jquery flowplayer tools plugin http://flowplayer.org/tools/tooltip.html
1)I want a tooltip to be created when user clicks on an element.
2)When
jQuery tools tooltip supports defining which events trigger the tooltip.
You do not need to handle the click event by yourself.
Edit: Updated the script. Click on the link to move the tooltip to the second element always.
Here is the script
var tt = $("h1").tooltip({
events:{def:'click, click'},
effect: "slide",
tip: '.tooltip' ,
position: "bottom center",
api: true,
delay: 30000
});
$("#ht").click(function() {
tt.hide();
$("#_2").tooltip().show();
});
The whole script
JS Bin
John
Mary
Dan
Paul
Kim
Click here
There should be only one tooltip on a page!