私は次のものを持っています:
MycheckModal.__construct = function(element){
this.blackout = $("<div class='modal-backdrop'></div>")
.attr("style", 'left:0px;top:0px;position:absolute;background:black')
.css("opacity", "0.5")
.css("height", $(document).height() + 'px')
.css("width", $(document).width() + 'px')
.css("z-index", "5000");
this.blackout.live("click", function(){
MycheckModal.__destruct();
});
}
MycheckModal.__destruct = function(){
this.element = null;
this.url = null;
this.blackout.fadeOut(150, function(){
MycheckModal.blackout.remove();
MycheckModal.blackout = null;
} );
this.modal.fadeOut(150, function(){
MycheckModal.modal.remove();
MycheckModal.modal = null;
} );
}
少し大きなコードですが、要点はわかります。とにかく-イベントハンドラーは登録されていませんが、コンストラクターの外側で明示的に登録すると、正常に動作します。
私がしなければならないことはありますか?