@@ 3455-3489 (lines=35) @@ | ||
3452 | return Sizzle( expr, null, null, [node] ).length > 0; |
|
3453 | }; |
|
3454 | ||
3455 | Sizzle.find = function( expr, context, isXML ) { |
|
3456 | var set; |
|
3457 | ||
3458 | if ( !expr ) { |
|
3459 | return []; |
|
3460 | } |
|
3461 | ||
3462 | for ( var i = 0, l = Expr.order.length; i < l; i++ ) { |
|
3463 | var match, |
|
3464 | type = Expr.order[i]; |
|
3465 | ||
3466 | if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { |
|
3467 | var left = match[1]; |
|
3468 | match.splice( 1, 1 ); |
|
3469 | ||
3470 | if ( left.substr( left.length - 1 ) !== "\\" ) { |
|
3471 | match[1] = (match[1] || "").replace(/\\/g, ""); |
|
3472 | set = Expr.find[ type ]( match, context, isXML ); |
|
3473 | ||
3474 | if ( set != null ) { |
|
3475 | expr = expr.replace( Expr.match[ type ], "" ); |
|
3476 | break; |
|
3477 | } |
|
3478 | } |
|
3479 | } |
|
3480 | } |
|
3481 | ||
3482 | if ( !set ) { |
|
3483 | set = typeof context.getElementsByTagName !== "undefined" ? |
|
3484 | context.getElementsByTagName( "*" ) : |
|
3485 | []; |
|
3486 | } |
|
3487 | ||
3488 | return { set: set, expr: expr }; |
|
3489 | }; |
|
3490 | ||
3491 | Sizzle.filter = function( expr, set, inplace, not ) { |
|
3492 | var match, anyFound, |
@@ 4051-4084 (lines=34) @@ | ||
4048 | return Sizzle( expr, null, null, [node] ).length > 0; |
|
4049 | }; |
|
4050 | ||
4051 | Sizzle.find = function( expr, context, isXML ) { |
|
4052 | var set, i, len, match, type, left; |
|
4053 | ||
4054 | if ( !expr ) { |
|
4055 | return []; |
|
4056 | } |
|
4057 | ||
4058 | for ( i = 0, len = Expr.order.length; i < len; i++ ) { |
|
4059 | type = Expr.order[i]; |
|
4060 | ||
4061 | if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { |
|
4062 | left = match[1]; |
|
4063 | match.splice( 1, 1 ); |
|
4064 | ||
4065 | if ( left.substr( left.length - 1 ) !== "\\" ) { |
|
4066 | match[1] = (match[1] || "").replace( rBackslash, "" ); |
|
4067 | set = Expr.find[ type ]( match, context, isXML ); |
|
4068 | ||
4069 | if ( set != null ) { |
|
4070 | expr = expr.replace( Expr.match[ type ], "" ); |
|
4071 | break; |
|
4072 | } |
|
4073 | } |
|
4074 | } |
|
4075 | } |
|
4076 | ||
4077 | if ( !set ) { |
|
4078 | set = typeof context.getElementsByTagName !== "undefined" ? |
|
4079 | context.getElementsByTagName( "*" ) : |
|
4080 | []; |
|
4081 | } |
|
4082 | ||
4083 | return { set: set, expr: expr }; |
|
4084 | }; |
|
4085 | ||
4086 | Sizzle.filter = function( expr, set, inplace, not ) { |
|
4087 | var match, anyFound, |