I think we all know that In IE, typeof window.alert , returns “object”
Here is my portable isFunction() , IMHO it might be ine of the
simplest solutions that I have seen?
// GPL (c) 2009 by DBJ.ORG
var isFunction = typeof (top.alert) == "object" ?
function(x) {
return (x + "").match(/function/) !== null ;
}
:
function (x) {
return x instanceof Function;
}
// test
isFunction( window.alert )
// returns true, in all browsers
Enjoy …
--DBJ
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---