jqueryボイラープレート()を使用していますが、さまざまなメソッドを介してオプションにアクセスできません。
例えば
Plugin.prototype = {
init: function()
{
console.log(this.options); // This output my options
$(this.element).on('mouseenter', this.enter);
$(this.element).on('mouseleave', this.leave);
$(this.element).on('click', this.click);
},
enter: function(e)
{
console.log(this.options); // This output 'undefined'
}
}
enterメソッドのオプションにアクセスしようとしていますが、成功しません。
誰かが私が理由を理解するのを手伝ってくれる?
ありがとう