---
title: "插件写法"
author: "diaochenlong2"
date: "2012-11-12T16:28:16Z"
tags: ["JavaScript", "UI", "XHTML", "jQuery"]
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2012-11-12T16:28:16Z"
id: 1723099
url: "https://diaochenlong2.iteye.com/blog/1723099"
---

(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