6
下面這個簡單的代碼描述了我的問題(至少我hopse左右):繼承jQuery UI的對話框,並調用覆蓋的方法
$.widget("ui.mydialog", $.ui.dialog, {
_create: function() {
// How to call _create method of dialog?
}
});
席力圖召$.ui.dialog.prototype._create()
從內上述create方法,但得到以下錯誤在Firebug:
this.element is undefined
this.originalTitle = this.element.attr('title');
jquery...5667348 (line 5864)
我怎麼能稱之爲「超級」方法?
jQuery UI的版本1.8.8
對於jQueryUI的1.9倍,你可以簡單地做:`這._super('_ create');`上面的解決方案也是有效的。 – earcam 2012-07-20 13:24:23