Adding an event handler to a DIV to detect when visibility changes

Adding an event handler to a DIV to detect when visibility changes

Is it possible to add an event handler to react to a change in visibility of a DIV element?  If so how?

Thanks.