X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=fedd292750138ea6c2bd8dea3f90a1caae3d4301;hb=5a92ec263d8289d2b6d21bcbfe02910c47a6ea4a;hp=98a0dc4bd5f3fd554465146f5c35b28ee5d6b658;hpb=69f72761faa6878e361711b70f1d27c467d256e4;p=jquery.git diff --git a/src/core.js b/src/core.js index 98a0dc4..fedd292 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 @@ -1359,3 +1359,8 @@ jQuery.each([ "Height", "Width" ], function(i, name){ this.css( type, size.constructor == String ? size : size + "px" ); }; }); + +// Helper function used by the dimensions and offset modules +function num(elem, prop) { + return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; +} \ No newline at end of file