(function($) { var plugin_name = 'tab'; var plugin = function(ele,opt){ this.element = ele, this.defaults = { panel:'', content:'' }; this.options = $.extend(true,{}, this.defaults, opt); this.read(); } plugin.prototype ={ read:function(){ } } $.fn[plugin_name] = function(options){ var obj = new plugin(this,options); return obj.read; } })(jQuery);