jQuery named function – run every time

Hey. I have a very simple jQuery function for displaying a message box when data arrives via ajax-calls. The code for the function is as follows:

Code (text):

 

function showUpdateInfo(data,infotype) {

     var setClass = infotype;

     $("#updateinfo").css({‘display’:’block’}).addClass(setClass).text(data).fadeOut(3500);

     return false;

   };

 

My problem is that this function works, but only if the fadeOut is done – ie, if a user clicks on stuff before the fadeOut is done, a new messagebox…
jQuery named function – run every time

See original post by PoPSiCLe

Leave a Reply