diff --git a/src/dialog.js b/src/dialog.js index a14431d..6fdf21a 100644 --- a/src/dialog.js +++ b/src/dialog.js @@ -389,20 +389,18 @@ $.extend(prototype, { val.value + ''; - that._$('button') - .on('click', '[i-id=' + id + ']', function(event) { - var $this = $(this); - if (!$this.attr('disabled')) { // IE BUG - that._trigger(id); - } - - event.preventDefault(); - }); - }); } - this._$('button').html(html); + this._$('button').html(html).off('.art.button').on('click.art.button', '[i-id]', function (event) { + var $this = $(this), + id = $this.attr("i-id"); + if (!$this.attr('disabled')) {// IE BUG + that._trigger(id); + } + + event.preventDefault(); + }); this._$('footer')[number ? 'show' : 'hide'](); return this; @@ -467,4 +465,4 @@ artDialog.defaults = defaults; -module.exports = artDialog; \ No newline at end of file +module.exports = artDialog;