提交 db6a0601 编写于 作者: C Catouse

* fix modal trigger not work sometimes.

上级 d59b6180
......@@ -24,6 +24,9 @@
this.$trigger = $trigger;
this.options = options;
this.id = $.zui.uuid();
if (options.show) {
this.show();
}
};
ModalTrigger.DEFAULTS = {
......@@ -393,8 +396,11 @@
type: $this.hasClass('iframe') ? 'iframe' : ''
}, $this.data(), $.isPlainObject(option) && option);
if(!data) $this.data(NAME, (data = new ModalTrigger(options, $this)));
if(typeof option == STR_STRING) data[option](settings);
else if(options.show) data.show(settings);
else {
if(typeof option == STR_STRING) data[option](settings);
else if(options.show) data.show(settings);
return;
}
$this.on((options.trigger || 'click') + '.toggle.' + NAME, function(e) {
options = $.extend(options, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册