有谁知道如何检查被调用的ui(自定义)是否也输入了选项或使用默认值?
例如:
$('#selector').myUI();//does not have options.
$('#selector').myUI({option:'foo',{op:'bar'}});//ui has options.
$('#selector').myUI('value');//ui has options.
所以如果我在:
(function($) {
$.widget("ui.myUI", {
options = this.options;
//check if options have been entered or the default values have been used?
})
});