//jquery插件模板
(function($){
$.fn.ui = function(o) {
//参数
var def = {
width:180,
height:220,
onselected:function(){} //选择后事件
};
//绑定参数
$.extend(def,o);
var me;
var _style = {}; //样式
return this.each(fucntion(e){
me = jQuery(this);
_clear();
me.css('width',def.width);
//初始化
_initMain();
//绑定函数
me.bind('setUi',function(e,text){
jQuery(input).val(text);
});
return me;
});
//函数
function _initMain() {
// body...
}
function _clear() {
}
//绑定函数
$.fn.getUi = function() {
return jQuery().attr().val();
}
}
})(jQuery)