I think I understand what you are looking for. Just use .delay()
and .fadeIn()
.
function infoBox(title,text){
$('.infobox').dialog({
open: function( event, ui ) {
var p = $('<p style="display:none;">'+text+'</p>')
$('.infobox').append(p);
p.delay(1000).fadeIn(400);
},
beforeClose: function( event, ui ) {$('.infobox p').remove();
},
show:'drop' ,
position:'top',
title:title,
});
}
DEMO: http://jsfiddle.net/dirtyd77/yTMwu/69/
EDIT: You can also write it like this:
$('.infobox').append('<p style="display:none;">'+text+'</p>').find('p').delay(1000).fadeIn(400);