Browse Source

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

Dante 12 years ago
parent
commit
f147b24124
1 changed files with 6 additions and 1 deletions
  1. 6 1
      js/bootstrap-dialog.js

+ 6 - 1
js/bootstrap-dialog.js

@@ -5,6 +5,8 @@
  * 
  * 
  * javanoob@hotmail.com
  * javanoob@hotmail.com
  * 
  * 
+ * https://github.com/nakupanda/bootstrap3-dialog
+ * 
  * Licensed under The MIT License.
  * Licensed under The MIT License.
  * ================================================ */
  * ================================================ */
 var BootstrapDialog = null;
 var BootstrapDialog = null;
@@ -108,7 +110,10 @@ var BootstrapDialog = null;
             return this;
             return this;
         },
         },
         createModal: function() {
         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() {
         getModal: function() {
             return this.$modal;
             return this.$modal;