Commit b13a961f authored by Ariel Flesler's avatar Ariel Flesler

jquery core: closes #1480, isFunction is even tougher.

parent d524c7ee
......@@ -615,7 +615,7 @@ jQuery.extend({
// See test/unit/core.js for details concerning this function.
isFunction: function( fn ) {
return !!fn && typeof fn != "string" && !fn.nodeName &&
fn.constructor != Array && /function/i.test( fn + "" );
fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
},
// check if an element is in a (or is an) XML document
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment