simplemodal
simplemodal copied to clipboard
creating with HTML string does not center the dialog
You can create with $.modal($('
asdf
however, if you create the modal like below, $.modal('
asdf
so if you apply patch below, @@ -231,6 +231,7 @@ */ init: function (data, options) { var s = this;
-
var testData = null; // don't allow multiple calls if (s.d.data) {
@@ -270,6 +271,9 @@ } } }
-
else if (typeof data === 'string' && (testData = $(data)).length > 0) {
-
data = testData;
-
} else if (typeof data === 'string' || typeof data === 'number') { // just insert the data as innerHTML data = $('<div></div>').html(data);
You can use HTML string as data.
Sorry for the sloppy patch. It's my first patch...