aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-03-11 10:49:19 -0500
committerjeresig <jeresig@gmail.com>2010-03-11 10:49:19 -0500
commitba8938d444b9a49bdfb27213826ba108145c2e50 (patch)
tree49d236355b921c9831ec11e32fce6cc5cf5b8623 /src
parentda26d0eb4e7f563da72cf4d5e9a1d99f6719fea4 (diff)
downloadjquery-ba8938d444b9a49bdfb27213826ba108145c2e50.tar.gz
jquery-ba8938d444b9a49bdfb27213826ba108145c2e50.zip
Switch to using String.prototype.trim from String.trim as it's more-widely available.
Diffstat (limited to 'src')
-rw-r--r--src/core.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 3f156a5fd..699b87ac9 100644
--- a/src/core.js
+++ b/src/core.js
@@ -53,6 +53,7 @@ var jQuery = function( selector, context ) {
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
+ trim = String.prototype.trim,
indexOf = Array.prototype.indexOf;
jQuery.fn = jQuery.prototype = {
@@ -569,11 +570,11 @@ jQuery.extend({
},
// Use native String.trim function wherever possible
- trim: String.trim ?
+ trim: trim ?
function( text ) {
return text == null ?
"" :
- String.trim( text );
+ trim.call( text );
} :
// Otherwise use our own trimming functionality