插件写法
(function($) { $.extend({ progressBar: new function() { /* public methods */ this.construct = function(arg1, arg2) { alert('test'); }; } }); $.fn.extend({ test: $.progressBar.construct }); })(jQuery); $(document).ready(function() { jQuery("#spaceused1").test(); }); ---------------------------------------------------------------------------------- jQuery UI Dialog - Default functionality