(関数 ($) {
//插件定义--更换名字
$.fn.tabpanel = 関数 (メソッド) {
var メソッド = $.fn.tabpanel.methods;
if (メソッド[メソッド]) {
return メソッド[メソッド].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (メソッドのタイプ === 'オブジェクト' || !メソッド) {
return Methods.init.apply(this, argument);
} else {
}
}
//サポートされるメソッド
$.fn.tabpanel.methods =
{
//初期化
init: 関数 (p_options) {
tabpanelBind(p_options, this);
}、
追加: 関数 (p_options) {
addTab(p_options, this);
tabpanelBind(p_options, this);
// デバッガ
} }
関数 add(p_options) {
var _defaults = {
id: ""
}
//内部实现略.....
return _index;
}
})(jQuery);
调用 $("#team").tabpanel('add',"");
好了、上面介在のこの 2 つの公開方式はすべて最もよく使用され、小伴们先好好学习下吧、後续我们再介绍のより深入りなこれら