this is a fairly old trick but i get asked about it pretty commonly, so…

monkey patch to raise an event when showing or hiding elements:

POC: http://jsfiddle.net/moagrius/ka78R/