aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2006-08-15 04:40:21 +0000
committerJohn Resig <jeresig@gmail.com>2006-08-15 04:40:21 +0000
commitafbd2e37c981234e3b8f891448d4612cd013bd96 (patch)
tree6e065642f5a19aa351360303a481e176eb70c8a6
parent269ff25860737c7bd86d451256886332263c07fd (diff)
downloadjquery-afbd2e37c981234e3b8f891448d4612cd013bd96.tar.gz
jquery-afbd2e37c981234e3b8f891448d4612cd013bd96.zip
Added fix for multiple attribute selectors w/ test cases.
-rw-r--r--src/jquery/jquery.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index bdb46a82b..da0e582dd 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -1089,6 +1089,9 @@ jQuery.extend({
* @test t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] );
* @test t( "Attribute Equals", 'a[@rel="bookmark"]', ["simon1"] );
* @test t( "Attribute Equals", "a[@rel=bookmark]", ["simon1"] );
+ * @test t( "Multiple Attribute Equals", "input[@type='hidden'],input[@type='radio']", ["hidden1","radio1","radio2"] );
+ * @test t( "Multiple Attribute Equals", "input[@type=\"hidden\"],input[@type='radio']", ["hidden1","radio1","radio2"] );
+ * @test t( "Multiple Attribute Equals", "input[@type=hidden],input[@type=radio]", ["hidden1","radio1","radio2"] );
*
* @test t( "Attribute Begins With", "a[@href ^= 'http://www']", ["google","yahoo"] );
* @test t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] );
@@ -1286,7 +1289,7 @@ jQuery.extend({
.replace( 'S', "([a-z*_-][a-z0-9_-]*)" )
// Look for something (optionally) enclosed with quotes
- .replace( 'Q', " *'?\"?([^'\"]*)'?\"? *" ), "i" );
+ .replace( 'Q', " *'?\"?([^'\"]*?)'?\"? *" ), "i" );
var m = re.exec( t );