allFunciton.js
$('#html_id').on('any_event', function(e){
$(this).off('any_event');
});
もちろんこれでもいいのだが、他のイベントリスナーまでオフにしてしまう。
なのでe.handleObj.handlerを使って解決する。
selfFuncitonOnly.js
$('#html_id').on('any_event', function(e){
$(this).off('any_event', e.handleObj.handler);
});
上記、jQueryなのでブラウザテストしてないです!!!
以下でも行ける気がするのだが、どうなんだろう。
useFunction.js
handlerFunction = function(e){
$(this).off('any_event', handlerFunction);
}
$('#html_id').on('any_event', handlerFunction);
評価順的に混乱しそうなのでやってないです・・・・