I'm trying to get a piece of our JavaScript run after some 3rd party code makes a modal dialog appear. I saw a pretty neat idea of hijacking the jQuery show function, but unfortunately it is not working. I'm guessing this idea used to work on an older version of jQuery back in 2009, but not now on the latest version. Here is a jsFiddle with the implementation and a sample:
http://jsfiddle.net/mkmurray/drv5w/2/
As you can see by running the sample, it will alert the 'beforeShow' event, but not the 'afterShow event' and with some debugging I can see that it is not calling the 'newCallback' function entirely.
Thank you in advance with any help you can provide.