Added support for sorting in Safari - when querySelectorAll isn't able to be used.
This commit is contained in:
parent
d75c899fe7
commit
6f4b08cdf9
3 changed files with 17 additions and 3 deletions
|
@ -75,7 +75,9 @@ jQuery.fn = jQuery.prototype = {
|
|||
this.context = selector.context;
|
||||
}
|
||||
|
||||
return this.setArray(jQuery.makeArray(selector));
|
||||
return this.setArray(jQuery.isArray( selector ) ?
|
||||
selector :
|
||||
jQuery.makeArray(selector));
|
||||
},
|
||||
|
||||
// Start with an empty selector
|
||||
|
@ -95,7 +97,7 @@ jQuery.fn = jQuery.prototype = {
|
|||
return num === undefined ?
|
||||
|
||||
// Return a 'clean' array
|
||||
jQuery.makeArray( this ) :
|
||||
Array.prototype.slice.call( this ) :
|
||||
|
||||
// Return just the object
|
||||
this[ num ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue