/** * dialog 1.0.0 * * (c) 2011 愚人码头 * http://www.css88.com/ */ jquery.fn.dialog=function(option){ var option = option || {}; return this.each(function(){ }); } //dialog class function dialog(element,options){ this.tpagewidth=$("body").width(); this.tpageheight=$(document).height(); this.dialog=$(dialog.wrapper); jquery.data(this.dialog[0], 'dialog', this); this.visible = false; this.options = jquery.extend({}, dialog.defaults, options || {}); var self = this; this.dialog.css({ 'display':'none', 'width':self.options.width ? self.options.width : self.width }).appendto(document.body); this._setuptitlebar(); this.setcontent(element || '
暂无内容...
'); if (this.options.show) { this.show(); } } $.extend(dialog,{ wrapper:'
', defaults: { width:"200px", //宽度 title: null, // 标题. closeable: true, // 是否显示关闭按钮 show: true, // 立即显示dialog? modal: false, // 半透明遮罩背景 modalopacity: 0.7, //默认模态背景透明度 closetext: '关闭窗口', // 关闭窗口的提示文字 closedelay: 0, //自动关闭的延时时间,单位:毫秒 dtopnum:false, //弹框的top值,默认居中; closemodal:true //关闭模式 }, //页面加载 load:function(url,options){ var options = options || {}; //var loadhtml=; jquery.ajax({ url:url, type:"get", datetype:"html", cache:false, success:function(html){ html = jquery(html); new dialog(html, options); } }); }, // frame:function(frameid,url,options){ var options = options || {}; var framehtml=$("