Execute function with jQuery if widget added or removed?

Execute function with jQuery if widget added or removed?