> Many thanks for your reply, although I'm totally confused now ...

I was just giving an example of using type-checking on the options
argument.  The following is a real snippet from the ajaxSubmit fn of
the form plugin:

    if (typeof options == 'function')
        options = { success: options };

The common usage of the ajaxSubmit fn is to pass an option *object*.
But that fn also permits you to pass a callback function by itself.
If you do pass a callback then a new options object is created and its
success property is assigned to the callback.  (footnote: I should be
using $.isFunction in that test).

But what happens after you do your type checking is up to you.  In the
case of the ajaxSubmit example, processing continues as normal.


> If so, would doing this effect the 'options' or 'method' code by  
> preventing either being able to run functions within the plugin eg,
>
> var someFunction = function(e) {
> // do something
> return false;
>
> };

Not sure I understand that last question, but I don't see why
"someFunction" would effect anything.

Mike

Reply via email to