0
두 가지 기능을 버그 처리하고 이벤트를 발생시키기위한 코드가 있습니다. 그러나 어떤 이유로 이벤트가 실행되지 않는 것 같습니다. 예상대로 콘솔에 로그온하지만 이벤트가 실행되지 않습니다.이벤트가 실행되지 않습니다.
//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();});
'jQuery ("# backstageArea")를 시도해 봤나?'jQuery.bind (...'?) 대신 bind (...'? – nnnnnn
그랬습니다. 답변에 넣을 수 있습니까? –
아직 자바 스크립트 및 기타 오류를 디버깅하는 데 유용한 도구 인 [** Firebug **] (https://getfirebug.com/)를 확인하십시오. –