2009/8/4 DBJDBJ <dbj...@gmail.com>:
> Is this not the simplest working solution ?
>
> // GPL (c) 2009 by DBJ.ORG
> function isFunction(x) {
>                 switch (typeof x) {
>                        case "function" : return true ;
>                        case "object"   : return (x + "").match(/
> function/) !== null ;
>                        default    : return false ;
>                 }
>         }
>

var a = {
    "foo": "function",
    "toString": function() { return this.foo }
};
alert(isFunction(a));
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to