Hello, I have the following function:
// Show and fade out a feedback message $.fn.addFeedback = function(feedbackMessage){ var offset = $(this).offset(); var feedbackDiv = "<div class='feedback' id='feedbackElement' style='display:none;position:absolute;left:" + offset.left + "px;top:" + ( offset.top + 0) +"px'><p>" + feedbackMessage + "</p></div>"; $("body").append(feedbackDiv); $('#feedbackElement').fadeIn('slow'); setTimeout("$('#feedbackElement').fadeOut('slow', function(){$('#feedbackElement').remove();});",3000); } How do I change this to add an optional callback function to operate once the function has completed? Thanks, Dan. -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/blog