i have a strange problem with jquery i have this div that shows messages for ajaxified actions and i want the message to go away when after 5 seconds .. it works for the first time.. but when i trigger the action again in the same page the dialog appears but and never get fade out no matter what unless i close it by press the X button .. the code is
jQuery( "#dialog" ).dialog({
open: function(event, ui) {
setTimeout(function(){
jQuery("#dialog").dialog("close");
}, 5000);
},
hide: "fadeOut"
});
and it's included in a jsp page that include in all ajax pages..what is the problem??