return (text || "").replace( /^\s+|\s+$/g, "" );
},
+ // NOTE: Due to the conflict with Scriptaculous (http://dev.jquery.com/ticket/3248)
+ // We remove support for functions since jQuery 1.3
makeArray: function( array ) {
var ret = [];
if( array != null ){
var i = array.length;
- //the window, strings and functions also have 'length'
- if( i == null || array.split || array.setInterval || array.call )
+ // The window, strings (and functions) also have 'length'
+ if( i == null || array.split || array.setInterval )
ret[0] = array;
else
while( i )
});\r
\r
test("jQuery.makeArray", function(){\r
- expect(15);\r
+ expect(14);\r
\r
equals( jQuery.makeArray(jQuery('html>*'))[0].nodeName, "HEAD", "Pass makeArray a jQuery object" );\r
\r
\r
ok( !!jQuery.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, "Pass makeArray a childNodes array" );\r
\r
- //function, is tricky as it has length\r
- equals( jQuery.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );\r
+ // function, is tricky as it has length\r
+ // NOTE: Due to the conflict with Scriptaculous (http://dev.jquery.com/ticket/3248)\r
+ // We remove support for functions since jQuery 1.3\r
+ //equals( jQuery.makeArray( function(){ return 1;} )[0](), 1, "Pass makeArray a function" );\r
+ \r
//window, also has length\r
equals( jQuery.makeArray(window)[0], window, "Pass makeArray the window" );\r
\r