So that it can be show or hide this way:
$(selector).pluginName('show')
$(selector).pluginName('hide')
The problem is how do I know which one to show or hide?
I'm now doing it this way:
$.fn.pluginName = function(opts) {
var conf = $.extend({},opts);
return this.each(function() {
if(conf && 'conf' == conf.type)
{
//ClassName is defined elsewhere
new ClassName(conf,$(this));
}
else
{
//**show or hide corresponding instance**
}
});
}