git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ignore eclipse' .project files
[jquery.git]
/
src
/
selector
/
selector.js
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
4a90bb9
..
34aaf61
100644
(file)
--- a/
src/selector/selector.js
+++ b/
src/selector/selector.js
@@
-63,7
+63,7
@@
jQuery.extend({
// Match: :even, :last-chlid, #id, .class
new RegExp("^([:.#]*)(" +
// Match: :even, :last-chlid, #id, .class
new RegExp("^([:.#]*)(" +
- ( jQuery.chars = jQuery.browser.safari && jQuery.browser.version < "3.0.0" ? "\\w" : "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)")
+ ( jQuery.chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? "(?:[\\w*_-]|\\\\.)" : "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)")
],
multiFilter: function( expr, elems, not ) {
],
multiFilter: function( expr, elems, not ) {
@@
-99,7
+99,7
@@
jQuery.extend({
// Handle the common XPath // expression
if ( !t.indexOf("//") ) {
// Handle the common XPath // expression
if ( !t.indexOf("//") ) {
- context = context.documentElement;
+ //context = context.documentElement;
t = t.substr(2,t.length);
// And the / root expression
t = t.substr(2,t.length);
// And the / root expression
@@
-142,7
+142,7
@@
jQuery.extend({
if ( t.indexOf(" ") == 0 ) continue;
foundToken = true;
} else {
if ( t.indexOf(" ") == 0 ) continue;
foundToken = true;
} else {
- re = /^((\/?\.\.)|([>\/+~]))\s*([a-z]*)/i;
+ re = /^((\/?\.\.)|([>\/+~]))\s*(\w*)/i;
if ( (m = re.exec(t)) != null ) {
r = [];
if ( (m = re.exec(t)) != null ) {
r = [];
@@
-213,7
+213,7
@@
jQuery.extend({
var elem = ret[ret.length-1];
// Try to do a global search by ID, where we can
var elem = ret[ret.length-1];
// Try to do a global search by ID, where we can
- if ( m[1] == "#" && elem && elem.getElementById ) {
+ if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
// Optimization for HTML document case
var oid = elem.getElementById(m[2]);
// Optimization for HTML document case
var oid = elem.getElementById(m[2]);
@@
-339,7
+339,7
@@
jQuery.extend({
for ( var i = 0, rl = r.length; i < rl; i++ ) {
var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
for ( var i = 0, rl = r.length; i < rl; i++ ) {
var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
- if ( z == null || /href|src/.test(m[2]) )
+ if ( z == null || /href|src|selected/.test(m[2]) )
z = jQuery.attr(a,m[2]) || '';
if ( (type == "" && !!z ||
z = jQuery.attr(a,m[2]) || '';
if ( (type == "" && !!z ||