From 679536ee4b7a92ae64a5f58d90e9cc38c001e807 Mon Sep 17 00:00:00 2001 From: Mike Sidorov Date: Thu, 12 Sep 2013 12:32:44 -0500 Subject: [PATCH] charAt -> string indexing. Close gh-1359. --- src/core/init.js | 2 +- src/css.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/init.js b/src/core/init.js index e349bb616..daf5d1909 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -23,7 +23,7 @@ var rootjQuery, // Handle HTML strings if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; diff --git a/src/css.js b/src/css.js index 79ab342d5..ee6a3935b 100644 --- a/src/css.js +++ b/src/css.js @@ -46,7 +46,7 @@ function vendorPropName( style, name ) { } // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), + var capName = name[0].toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; -- 2.39.5