firing code when an element is appended to

firing code when an element is appended to

Hi Folks,
         Say i have some container elements on a page which get other elements appended to them dynamically as a result of various events scattered throughout the javascript in the page... is there any way of attaching code that would get fired for that container whenever something gets appended to ( or deleted from) it ... like the change event for text boxes but much more generic?

Cheers,
       Robin.