From b13a961ff58553ad76f134a3504d0c567f1703da Mon Sep 17 00:00:00 2001 From: Ariel Flesler Date: Wed, 14 May 2008 20:10:39 +0000 Subject: [PATCH 1/1] jquery core: closes #1480, isFunction is even tougher. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 98a0dc4..e988d48 100644 --- a/src/core.js +++ b/src/core.js @@ -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 -- 1.7.10.4