Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
6171e0a9
Commit
6171e0a9
authored
May 14, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retrieve the class attribute on a form in IE6/7. Fixes 9286.
parent
cf702496
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
attributes.js
src/attributes.js
+3
-1
attributes.js
test/unit/attributes.js
+4
-1
No files found.
src/attributes.js
View file @
6171e0a9
...
@@ -322,7 +322,9 @@ jQuery.extend({
...
@@ -322,7 +322,9 @@ jQuery.extend({
hooks
=
boolHook
;
hooks
=
boolHook
;
// Use formHook for forms and if the name contains certain characters
// Use formHook for forms and if the name contains certain characters
}
else
if
(
formHook
&&
(
jQuery
.
nodeName
(
elem
,
"form"
)
||
rinvalidChar
.
test
(
name
))
)
{
}
else
if
(
formHook
&&
name
!==
"className"
&&
(
jQuery
.
nodeName
(
elem
,
"form"
)
||
rinvalidChar
.
test
(
name
))
)
{
hooks
=
formHook
;
hooks
=
formHook
;
}
}
}
}
...
...
test/unit/attributes.js
View file @
6171e0a9
...
@@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() {
...
@@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() {
});
});
test
(
"attr(String)"
,
function
()
{
test
(
"attr(String)"
,
function
()
{
expect
(
3
8
);
expect
(
3
9
);
equals
(
jQuery
(
"#text1"
).
attr
(
"type"
),
"text"
,
"Check for type attribute"
);
equals
(
jQuery
(
"#text1"
).
attr
(
"type"
),
"text"
,
"Check for type attribute"
);
equals
(
jQuery
(
"#radio1"
).
attr
(
"type"
),
"radio"
,
"Check for type attribute"
);
equals
(
jQuery
(
"#radio1"
).
attr
(
"type"
),
"radio"
,
"Check for type attribute"
);
...
@@ -117,6 +117,9 @@ test("attr(String)", function() {
...
@@ -117,6 +117,9 @@ test("attr(String)", function() {
ok
(
jQuery
(
"<div/>"
).
attr
(
"doesntexist"
)
===
undefined
,
"Make sure undefined is returned when no attribute is found."
);
ok
(
jQuery
(
"<div/>"
).
attr
(
"doesntexist"
)
===
undefined
,
"Make sure undefined is returned when no attribute is found."
);
ok
(
jQuery
().
attr
(
"doesntexist"
)
===
undefined
,
"Make sure undefined is returned when no element is there."
);
ok
(
jQuery
().
attr
(
"doesntexist"
)
===
undefined
,
"Make sure undefined is returned when no element is there."
);
var
$form
=
jQuery
(
"<form class='something'></form>"
).
appendTo
(
"#qunit-fixture"
);
equal
(
$form
.
attr
(
"class"
),
"something"
,
"Retrieve the class attribute on a form"
);
});
});
if
(
!
isLocal
)
{
if
(
!
isLocal
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment