mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Misc: Drop support for older browsers; update support comments
That includes IE<8, Opera 12.x, Firefox<29, Safari<6.0 and some hacks for old Blackberry. Fixes gh-1836 Fixes gh-1701 Refs gh-1815 Refs gh-1820
This commit is contained in:
committed by
Michał Gołębiowski
parent
a467f8653a
commit
90d7cc1d8b
@@ -27,8 +27,8 @@ var rootjQuery,
|
||||
|
||||
// Handle HTML strings
|
||||
if ( typeof selector === "string" ) {
|
||||
if ( selector.charAt(0) === "<" &&
|
||||
selector.charAt( selector.length - 1 ) === ">" &&
|
||||
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
|
||||
@@ -73,16 +73,8 @@ var rootjQuery,
|
||||
} else {
|
||||
elem = document.getElementById( match[2] );
|
||||
|
||||
// Check parentNode to catch when Blackberry 4.6 returns
|
||||
// nodes that are no longer in the document #6963
|
||||
if ( elem && elem.parentNode ) {
|
||||
// Handle the case where IE and Opera return items
|
||||
// by name instead of ID
|
||||
if ( elem.id !== match[2] ) {
|
||||
return rootjQuery.find( selector );
|
||||
}
|
||||
|
||||
// Otherwise, we inject the element directly into the jQuery object
|
||||
if ( elem ) {
|
||||
// Inject the element directly into the jQuery object
|
||||
this.length = 1;
|
||||
this[0] = elem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user