I have a jQuery function that needs parameters passed on to it. Let's say it's:
function myFunc(foo, moo) {
// Do something
}
However, in one page, there are 2 instances wherein this function is used with 2 different sets of parameters like so:
myFunc(foo1, moo1);
myFunc(foo2, moo2);
Let's say I have more than 2 different sets of parameters... do I always re-declare the function and then the parameters (like below) or is there a shorter way of doing it? And is it even correct?
myFunc(foo1, moo1);
myFunc(foo2, moo2);
myFunc(foo3, moo3);
...etc...