I have these bits of code that are supposed to bug two functions and fire events for them. For some reason, however, the event does not seem to trigger. They log to the console as expected, but the event never gets fired.
//Show backstage event
(function( $, oldRem ){
backstage.show = function(){
console.log("yup, I'm the right one");
var resp = oldRem.apply( this, arguments );
$("#backstageArea").trigger("showBackstage");
return(resp);
};
})( jQuery, backstage.show );
//Hide backstage event
(function( $, oldRem ){
backstage.hide = function(){
console.log("And so am I.");
var resp = oldRem.apply( this, arguments );
if(anim && config.chkAnimate) {setTimeout( 'jQuery("#backstageArea").trigger("hideBackstage")', config.animDuration);}
else {$("#backstageArea").trigger("hideBackstage");}
return(resp);
};
})( jQuery, backstage.hide );
//Resize never logs its console message.
jQuery.bind("hideBackstage", function(){topbar.resize();});
jQuery.bind("showBackstage", function(){topbar.resize();});