浏览代码

Use $.prop() to set modal id to avoid some problems.

Dante 12 年之前
父节点
当前提交
f147b24124
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      js/bootstrap-dialog.js

+ 6 - 1
js/bootstrap-dialog.js

@@ -5,6 +5,8 @@
  * 
  * javanoob@hotmail.com
  * 
+ * https://github.com/nakupanda/bootstrap3-dialog
+ * 
  * Licensed under The MIT License.
  * ================================================ */
 var BootstrapDialog = null;
@@ -108,7 +110,10 @@ var BootstrapDialog = null;
             return this;
         },
         createModal: function() {
-            return $('<div class="modal fade" tabindex="-1" id="' + this.getId() + '"></div>');
+            var $modal = $('<div class="modal fade" tabindex="-1"></div>');
+            $modal.prop('id', this.getId());
+
+            return $modal;
         },
         getModal: function() {
             return this.$modal;