Kyle Kyle - 2 months ago 25
HTML Question

jQuery tooltip, hide after.. time

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 :)

Answer

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');
    }
);
Comments