Javascript/jQuery: Varying parameters on a custom function
- by dclowd9901
I'm writing a plugin that will allow parameters to 'set it up.' But I predict the user won't always want to set up every aspect of the function.
function This_Function(a,b,c,d);
For instance, maybe they'll only want to set up a and c, but not b and d (they'll just prefer to leave those as defaults). How do I write the function (or the parameters for that matter) so that the user can customize which functions they would prefer to pass? I have a feeling it involves parsing input, but I've seen many other functions with this capability.
Thanks in advance for the help.