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
The FlowPlayer Tooltip has an API that is returned on EVERY call to tooltip.
You can then call hide on the API object.
Here's what your code should look like:
var old_id, API;
//first time - create tooltip
function my_create(id){
API = $("#"+id).tooltip({
effect: "slide",
tip: '.tooltip',
position: 'bottom center'
});
}
//next times - move tooltip to other element
function my_unlink(id){
API.unbind("mouseover");
//todo
}
function my_link(id){
my_create( id );
}
//THE MAIN FUNCTION
function do_tip(new_id){
if(old_id){
my_unlink(old_id);
my_link(new_id);
alert(new_id);
}
else
my_create(new_id);
old_id=new_id;
//new_id.focus();
}