(function($){ $.extend({ Dialog : function(id, options){ var option = $.extend({}, options); option.id = id; if(!option.content || option.content == "") { throw new Error("content不存在!"); } if(option.content.indexOf("url:") == 0) { url = option.content.replace("url:", ""); option.content = "loading..."; } var dialog = art.dialog(options); $.Dialog.self = dialog; if(url) { $.Ajax({ url : url, success : function(msg){ dialog.content(msg); } }); } } }); $.Dialog.PRototype = { close : function(){ $.Dialog.self.close(); } }; $.Dialog.constructor = Dialog; })(jQuery);
新闻热点
疑难解答