I have a div that is hidden and displayed through .hide() and .show() . When it displays .show() , I need it to do some things. Is there a way to set up a custom event listener that calls the callback when the div changes from visible to hidden? I can make a function and call it wherever I call $(#myDiv").show() , but this happens in several places, and I would like to keep it all in one place.
source share