mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
This commit is contained in:
parent
0e540ec1b1
commit
42785b1c1d
6
src/jquery/coreTest.js
vendored
6
src/jquery/coreTest.js
vendored
@ -379,7 +379,7 @@ test("expressions - child and adjacent", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("expressions - attributes", function() {
|
test("expressions - attributes", function() {
|
||||||
expect(16);
|
expect(19);
|
||||||
t( "Attribute Exists", "a[@title]", ["google"] );
|
t( "Attribute Exists", "a[@title]", ["google"] );
|
||||||
t( "Attribute Exists", "*[@title]", ["google"] );
|
t( "Attribute Exists", "*[@title]", ["google"] );
|
||||||
t( "Attribute Exists", "[@title]", ["google"] );
|
t( "Attribute Exists", "[@title]", ["google"] );
|
||||||
@ -395,6 +395,10 @@ test("expressions - attributes", function() {
|
|||||||
t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] );
|
t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] );
|
||||||
t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] );
|
t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] );
|
||||||
|
|
||||||
|
t("Select options via [@selected]", "#select1 option[@selected]", ["option1a"] );
|
||||||
|
t("Select options via [@selected]", "#select2 option[@selected]", ["option2d"] );
|
||||||
|
t("Select options via [@selected]", "#select3 option[@selected]", ["option3b", "option3c"] );
|
||||||
|
|
||||||
t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] );
|
t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] );
|
||||||
|
|
||||||
t( ":not() Existing attribute", "select:not([@multiple])", ["select1", "select2"]);
|
t( ":not() Existing attribute", "select:not([@multiple])", ["select1", "select2"]);
|
||||||
|
5
src/jquery/jquery.js
vendored
5
src/jquery/jquery.js
vendored
@ -1418,7 +1418,7 @@ jQuery.extend({
|
|||||||
enabled: "!a.disabled",
|
enabled: "!a.disabled",
|
||||||
disabled: "a.disabled",
|
disabled: "a.disabled",
|
||||||
checked: "a.checked",
|
checked: "a.checked",
|
||||||
selected: "a.selected || jQuery.attr(a, 'selected')",
|
selected: "a.selected",
|
||||||
|
|
||||||
// Form elements
|
// Form elements
|
||||||
text: "a.type=='text'",
|
text: "a.type=='text'",
|
||||||
@ -1570,7 +1570,8 @@ jQuery.extend({
|
|||||||
value: "value",
|
value: "value",
|
||||||
disabled: "disabled",
|
disabled: "disabled",
|
||||||
checked: "checked",
|
checked: "checked",
|
||||||
readonly: "readOnly"
|
readonly: "readOnly",
|
||||||
|
selected: "selected"
|
||||||
};
|
};
|
||||||
|
|
||||||
// IE actually uses filters for opacity ... elem is actually elem.style
|
// IE actually uses filters for opacity ... elem is actually elem.style
|
||||||
|
Loading…
Reference in New Issue
Block a user