0
jQueryUIのウィジェットファクトリを使用しています。私はコールバック内からオプションのハッシュにアクセスしたい。コールバック[_submitMakeHandler]内で、 'this'はクリックされた要素への参照です。jQueryUIウィジェットの質問、.deffered then()関数内でオプションのハッシュにアクセスするにはどうすればよいですか?
options: {
model: {
vehicleSelections: ko.observable({
year: ko.observable(),
make: ko.observable(),
model: ko.observable(),
submodel: ko.observable(),
engine: ko.observable()
})
}
},
_cacheMakes: function() {
var jqXHR = $.when($.getJSON('VehicleSelection/GetMakes2'));
jqXHR.then([this._loadMakes, this._templateMakes, this._submitMakeHandler]);
},
_submitMakeHandler: function (data) {
$('#formMakeSelection').delegate('a', 'click', function (e) {
debugger;
e.preventDefault();
var container = $(this).closest('div.flyout');
var link = container.data('el');
$(link).text(this.text);
//******* How do I properly access the options from here?????
});
}
ご協力ありがとうございました&トリック。私はこれを試して、それは動作しますが、それをやって間違った方法のように思えます。 $.ui.widgetName.prototype.options
乾杯、
〜CK