Currently i'm working on a jquery plugin and looking at other plugin code i found a common way to write it passing throught an object, somethng like :
$.fn.myplugin = function(method){
//... some code
object = new $.myobject(param);
//... other code
// myobject definition
$.myobject = function(param){
//.... my object code
}
}
I can't understand how works $.myobject definition and why many developers use it to define their plugins.
Could you give some info and tutorial/links to documentation if possibile ?