How to create jQuery namespace?
$.fn.zyl = {
foo1 : function(){
return this.each(function(){
//...
})}
}
I want to use $().zyl.foo1()
but this.each
is not a function.
I'd like to use $().zyl.foo1()
rather than $().zyl().foo1()
or $().zyl('foo1')
.