How do I create a jQuery plugin so that I can use namespaces in my plugin ?
$(\"#id1\").amtec.foo1();
$(\"#id1\").amtec.foo2();
None of th
I know it's an old question... But why write all this extra code when you can just replace . with _?
$.fn.amtec_foo1 = function(){ return this.each(function(){}); }
$.fn.amtec_foo2 = function(){ return this.each(function(){}); }
Better yet, give your plugin a name that's original & project agnostic.
$.fn.fooize = function(){ return this.html('Element has been Fooized!'); }