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
7856230f
Commit
7856230f
authored
Sep 19, 2011
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes whitespace junk
parent
8f447576
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
attributes.js
src/attributes.js
+11
-11
No files found.
src/attributes.js
View file @
7856230f
...
@@ -19,11 +19,11 @@ jQuery.fn.extend({
...
@@ -19,11 +19,11 @@ jQuery.fn.extend({
jQuery
.
removeAttr
(
this
,
name
);
jQuery
.
removeAttr
(
this
,
name
);
});
});
},
},
prop
:
function
(
name
,
value
)
{
prop
:
function
(
name
,
value
)
{
return
jQuery
.
access
(
this
,
name
,
value
,
true
,
jQuery
.
prop
);
return
jQuery
.
access
(
this
,
name
,
value
,
true
,
jQuery
.
prop
);
},
},
removeProp
:
function
(
name
)
{
removeProp
:
function
(
name
)
{
name
=
jQuery
.
propFix
[
name
]
||
name
;
name
=
jQuery
.
propFix
[
name
]
||
name
;
return
this
.
each
(
function
()
{
return
this
.
each
(
function
()
{
...
@@ -156,7 +156,7 @@ jQuery.fn.extend({
...
@@ -156,7 +156,7 @@ jQuery.fn.extend({
val
:
function
(
value
)
{
val
:
function
(
value
)
{
var
hooks
,
ret
,
var
hooks
,
ret
,
elem
=
this
[
0
];
elem
=
this
[
0
];
if
(
!
arguments
.
length
)
{
if
(
!
arguments
.
length
)
{
if
(
elem
)
{
if
(
elem
)
{
hooks
=
jQuery
.
valHooks
[
elem
.
nodeName
.
toLowerCase
()
]
||
jQuery
.
valHooks
[
elem
.
type
];
hooks
=
jQuery
.
valHooks
[
elem
.
nodeName
.
toLowerCase
()
]
||
jQuery
.
valHooks
[
elem
.
type
];
...
@@ -167,9 +167,9 @@ jQuery.fn.extend({
...
@@ -167,9 +167,9 @@ jQuery.fn.extend({
ret
=
elem
.
value
;
ret
=
elem
.
value
;
return
typeof
ret
===
"string"
?
return
typeof
ret
===
"string"
?
// handle most common string cases
// handle most common string cases
ret
.
replace
(
rreturn
,
""
)
:
ret
.
replace
(
rreturn
,
""
)
:
// handle cases where value is null/undef or number
// handle cases where value is null/undef or number
ret
==
null
?
""
:
ret
;
ret
==
null
?
""
:
ret
;
}
}
...
@@ -290,15 +290,15 @@ jQuery.extend({
...
@@ -290,15 +290,15 @@ jQuery.extend({
height
:
true
,
height
:
true
,
offset
:
true
offset
:
true
},
},
attrFix
:
{
attrFix
:
{
// Always normalize to ensure hook usage
// Always normalize to ensure hook usage
tabindex
:
"tabIndex"
tabindex
:
"tabIndex"
},
},
attr
:
function
(
elem
,
name
,
value
,
pass
)
{
attr
:
function
(
elem
,
name
,
value
,
pass
)
{
var
nType
=
elem
.
nodeType
;
var
nType
=
elem
.
nodeType
;
// don't get/set attributes on text, comment and attribute nodes
// don't get/set attributes on text, comment and attribute nodes
if
(
!
elem
||
nType
===
3
||
nType
===
8
||
nType
===
2
)
{
if
(
!
elem
||
nType
===
3
||
nType
===
8
||
nType
===
2
)
{
return
undefined
;
return
undefined
;
...
@@ -431,7 +431,7 @@ jQuery.extend({
...
@@ -431,7 +431,7 @@ jQuery.extend({
frameborder
:
"frameBorder"
,
frameborder
:
"frameBorder"
,
contenteditable
:
"contentEditable"
contenteditable
:
"contentEditable"
},
},
prop
:
function
(
elem
,
name
,
value
)
{
prop
:
function
(
elem
,
name
,
value
)
{
var
nType
=
elem
.
nodeType
;
var
nType
=
elem
.
nodeType
;
...
@@ -466,7 +466,7 @@ jQuery.extend({
...
@@ -466,7 +466,7 @@ jQuery.extend({
}
}
}
}
},
},
propHooks
:
{
propHooks
:
{
tabIndex
:
{
tabIndex
:
{
get
:
function
(
elem
)
{
get
:
function
(
elem
)
{
...
@@ -519,7 +519,7 @@ boolHook = {
...
@@ -519,7 +519,7 @@ boolHook = {
// IE6/7 do not support getting/setting some attributes with get/setAttribute
// IE6/7 do not support getting/setting some attributes with get/setAttribute
if
(
!
jQuery
.
support
.
getSetAttribute
)
{
if
(
!
jQuery
.
support
.
getSetAttribute
)
{
// Use this for any attribute in IE6/7
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
// This fixes almost every IE6/7 issue
nodeHook
=
jQuery
.
valHooks
.
button
=
{
nodeHook
=
jQuery
.
valHooks
.
button
=
{
...
...
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