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
00abeaee
Commit
00abeaee
authored
Mar 11, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Didn't actually need the hooks anymore
parent
4baa213d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
attributes.js
src/attributes.js
+9
-16
No files found.
src/attributes.js
View file @
00abeaee
...
...
@@ -275,6 +275,8 @@ jQuery.extend({
offset
:
true
},
attrFix
:
{},
attr
:
function
(
elem
,
name
,
value
,
pass
)
{
// don't get/set attributes on text, comment and attribute nodes
...
...
@@ -285,11 +287,14 @@ jQuery.extend({
if
(
pass
&&
name
in
jQuery
.
attrFn
)
{
return
jQuery
(
elem
)[
name
](
value
);
}
var
ret
,
notxml
=
elem
.
nodeType
!==
1
||
!
jQuery
.
isXMLDoc
(
elem
),
hooks
;
// Normalize the name if needed
name
=
notxml
&&
jQuery
.
attrFix
[
name
]
||
name
;
hooks
=
jQuery
.
attrHooks
[
name
];
if
(
value
!==
undefined
)
{
...
...
@@ -472,8 +477,8 @@ if ( !jQuery.support.optSelected ) {
// IE6/7 do not support getting/setting some attributes with get/setAttribute
if
(
jQuery
.
support
.
attrFix
)
{
var
attrFix
=
{
"for"
:
"htmlFor"
,
jQuery
.
extend
(
jQuery
.
attrFix
,
{
"for"
:
"htmlFor"
,
"class"
:
"className"
,
readonly
:
"readOnly"
,
maxlength
:
"maxLength"
,
...
...
@@ -483,17 +488,5 @@ if ( jQuery.support.attrFix ) {
tabindex
:
"tabIndex"
,
usemap
:
"useMap"
,
frameborder
:
"frameBorder"
};
jQuery
.
each
(
attrFix
,
function
(
key
,
name
)
{
jQuery
.
attrHooks
[
key
]
=
jQuery
.
extend
(
jQuery
.
attrHooks
[
key
],
{
get
:
function
(
elem
)
{
return
elem
.
getAttribute
(
name
);
},
set
:
function
(
elem
,
value
)
{
elem
.
setAttribute
(
name
,
value
);
return
value
;
}
});
});
});
}
\ No newline at end of file
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