For instance, say a function is passed an object and that function is supposed to set an event to fire on a timeout, how would I do it? Even more complicated, how would I do it if I needed to perform the action on a sub-selection of the object passed?
If I wanted to do this and I have just id's, then I could do the following: setTimeout("$(#'" + obj.id + " #message').fadeOut('slow', function () {$(this).remove();});", 5000); But what if the object passed doesn't have an id?