イベントが発生し、変数にアクセスしようとしている関数の内部にあるにもかかわらず、を取得しUncaught TypeError: Cannot read property '...' of undefined
ます。だから、言いましょう:
( function($) {
$.fn.main = function() {
this.setting = 1;
$("#someElement").scroll( function() {
console.debug(this.setting);
} );
}
} )(jQuery);
タイミングと関係があると思いますが、やはり間違っているかもしれません。コピーをthis
作成して公開する必要がありますか?誰?ありがとう。