Changeset 1595
- Timestamp:
- 03/25/07 20:30:16 (1 year ago)
- Files:
-
- 1 modified
-
trunk/jquery/src/selector/selector.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/selector/selector.js
r1593 r1595 77 77 78 78 // Match: :even, :last-chlid, #id, .class 79 /^([:.#]*)((?:[\w\u0128-\uFFFF*-]|\\.)+)/ 79 new RegExp("^([:.#]*)(" + 80 ( jQuery.chars = "(?:[\\w\u0128-\uFFFF*-]|\\\\.)" ) + "+)") 80 81 ], 81 82 … … 205 206 } else { 206 207 // Optomize for the case nodeName#idName 207 var re2 = /^(\w+)(#)((?:[\w\u0128-\uFFFF*-]|\\.)+)/;208 var re2 = new RegExp("^(\\w+)(#)(" + jQuery.chars + "+)"); 208 209 var m = re2.exec(t); 209 210 … … 215 216 // Otherwise, do a traditional filter check for 216 217 // ID, class, and element selectors 217 re2 = /^([#.]?)((?:[\w\u0128-\uFFFF*-]|\\.)*)/;218 re2 = new RegExp("^([#.]?)(" + jQuery.chars + "*)"); 218 219 m = re2.exec(t); 219 220 } … … 230 231 // Do a quick check for the existence of the actual ID attribute 231 232 // to avoid selecting by the name attribute in IE 232 if ( jQuery.browser.msie&& oid && oid.id != m[2] )233 if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && oid.id != m[2] ) 233 234 oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; 234 235 … … 238 239 239 240 } else { 240 // We need to find all descendant elements, it is more 241 // efficient to use getAll() when we are already further down 242 // the tree - we try to recognize that here 241 // We need to find all descendant elements 243 242 for ( var i = 0, rl = ret.length; i < rl; i++ ) { 244 243 // Grab the tag name being searched for
