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
2d70dc9c
Commit
2d70dc9c
authored
Sep 17, 2010
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Derp, had parseInt on the brain. Thanks karbassi in
6541eb9d
.
parent
9dd70a44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dimensions.js
src/dimensions.js
+3
-3
effects.js
src/effects.js
+1
-1
No files found.
src/dimensions.js
View file @
2d70dc9c
...
...
@@ -8,14 +8,14 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// innerHeight and innerWidth
jQuery
.
fn
[
"inner"
+
name
]
=
function
()
{
return
this
[
0
]
?
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
"padding"
)
,
10
)
:
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
"padding"
)
)
:
null
;
};
// outerHeight and outerWidth
jQuery
.
fn
[
"outer"
+
name
]
=
function
(
margin
)
{
return
this
[
0
]
?
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
margin
?
"margin"
:
"border"
)
,
10
)
:
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
margin
?
"margin"
:
"border"
)
)
:
null
;
};
...
...
@@ -50,7 +50,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// Get or set width or height on the element
size
===
undefined
?
// Get width or height on the element
parseFloat
(
jQuery
.
css
(
elem
,
type
)
,
10
)
:
parseFloat
(
jQuery
.
css
(
elem
,
type
)
)
:
// Set the width or height on the element (default to pixels if value is unitless)
this
.
css
(
type
,
typeof
size
===
"string"
?
size
:
size
+
"px"
);
...
...
src/effects.js
View file @
2d70dc9c
...
...
@@ -316,7 +316,7 @@ jQuery.fx.prototype = {
return
this
.
elem
[
this
.
prop
];
}
var
r
=
parseFloat
(
jQuery
.
css
(
this
.
elem
,
this
.
prop
)
,
10
);
var
r
=
parseFloat
(
jQuery
.
css
(
this
.
elem
,
this
.
prop
)
);
return
r
&&
r
>
-
10000
?
r
:
0
;
},
...
...
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