The following describes an object with two methods
$.test = {
foo: function() {
this.bar();
},
bar: function() {
}
}
$.test.foo();
It just defines two functions
$.testFoo = function() {
$.testBar();
}
$.testBar = function() {
}
$.testFoo();
If you want to associate two functions with each other, use an object. If functions perform two completely different things, then simply define separate functions
source
share