在IE(全部)中收到错误。每个其他浏览器都处理得很好。
对象不支持此操作
var process = new $.ProcessingModal({ message: "Saving...", wait: 1000 });
process.open();
基本功能设置 $ .ProcessingModal = function(options){...}
甚至尝试过Object.create。
如果我只能停止支持IE。
$.ProcessingModal = function (options) {
// default options
this.defaultOptions = {
message: 'Processing...', // message to appear in the process box.
wait: 1000, // time to wait before showing.
timeout: null
};
// open the process modal
this.open = function () {
var o = this;
var opts = o.defaultOptions;
opts.timeout = setTimeout(function () {
$("#process_Modal").modal({
modalCss: "modH_adj modW_5 grey_modal",
onShow: function (dialog) {
SetModalFocus(dialog);
$("p#process_message > strong").text(opts.message);
},
close: false,
containerId: 'payce_modal_processing'
});
}, opts.wait);
$('body').ajaxStart(function (opts) {
closeModal(); //close any modal that maybe open.
});
$('body').ajaxComplete(function (opts) {
o.close(opts);
});
};
this.close = function (opts) {
if (opts == null)
opts = this.defaultOptions;
clearTimeout(opts.timeout);
$.modal.close();
};
// set any options.
$.extend(this.defaultOptions, options);
};