Hi there, I struggle with execution time of JS. As any line after some other does not wait for the line before to be executed, my script works sometimes ... and sometimes not. It looks like that:
$.ajax({ ... success: function(msg){ if (msg!='') { $("#"+eleID+" .message .content").empty().append(msg); onReadyStuff(eleID); } } }); Most times I execute the script, "onReadyStuff()" is faster than the line before but is has to be executed after append(); What I need is something like $("#"+eleID+" .message .content").empty().append(msg, function() {onReadyStuff(eleID);}); How do I do this? Eric