V4 ;o)
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 ;
}
}
isFunction( top.alert )
/*
true
*/
isFunction( isFunction )
/*
true
*/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---