I'm using the Flowplayer.org Tooltips and I'd like it to disappear after 4 seconds.
Here's the code for it, can anyone help?
$("#search").tooltip({ offset: [45, 170], effect: 'slide' });
Thanks :)
I'm using the Flowplayer.org Tooltips and I'd like it to disappear after 4 seconds.
Here's the code for it, can anyone help?
$("#search").tooltip({ offset: [45, 170], effect: 'slide' });
Thanks :)
Edit. Borrowed this from another Stack overflow question. It works here: http://jsfiddle.net/mmRu2/
jQuery.fn.delay = function(time,func){
return this.each(function(){
setTimeout(func,time);
});
};
$('#search').delay(2000, function(){
$('#search').fadeOut('fast');
}
);
After that code put
setTimeout(function() {
$(".tooltip").fadeOut("slow");
}, 4000);
have you tried delay?
$("#search").tooltip({ offset: [45, 170], delay: 4000, effect: 'slide' });
None of these answers worked for me. Jamal got close, but missed the important parts.
Working code to hide a tooltip after 4seconds:
<script>
$("s.howTooltip").tooltip({
//start when the tooltip is shown
onShow: function () {
//store a reference to this
var self = this;
//start a timeout for 4seconds
setTimeout(function () {
//get a reference to the tooltip and hide it.
self.getTip().hide();
}, 4000)
}
})
</script>
try the following callback... hope it will work... but i will fade to opacity 0.8... u can change the rest...
onShow: function() {
this.getTrigger().fadeTo("slow", 0.8);
}