charAt -> string indexing. Close gh-1359.

This commit is contained in:
Mike Sidorov 2013-09-12 12:32:44 -05:00 committed by Timmy Willison
parent 4228905b14
commit 679536ee4b
2 changed files with 2 additions and 2 deletions

View File

@ -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 ];

View File

@ -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;