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
bdce86dc
Commit
bdce86dc
authored
May 25, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move window/document test to dimensions for consistency
parent
edb22865
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
css.js
src/css.js
+0
-5
dimensions.js
src/dimensions.js
+6
-6
No files found.
src/css.js
View file @
bdce86dc
...
...
@@ -170,11 +170,6 @@ jQuery.each(["height", "width"], function( i, name ) {
get
:
function
(
elem
,
computed
,
extra
)
{
var
val
;
// Tests for window/document
if
(
!
elem
.
style
)
{
return
null
;
}
if
(
computed
)
{
if
(
elem
.
offsetWidth
!==
0
)
{
val
=
getWH
(
elem
,
name
,
extra
);
...
...
src/dimensions.js
View file @
bdce86dc
...
...
@@ -7,17 +7,17 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// innerHeight and innerWidth
jQuery
.
fn
[
"inner"
+
name
]
=
function
()
{
var
ret
;
return
this
[
0
]
&&
!
isNaN
(
ret
=
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
"padding"
))
)
?
ret
:
var
elem
=
this
[
0
]
;
return
elem
&&
elem
.
style
?
parseFloat
(
jQuery
.
css
(
elem
,
type
,
"padding"
)
)
:
null
;
};
// outerHeight and outerWidth
jQuery
.
fn
[
"outer"
+
name
]
=
function
(
margin
)
{
var
ret
;
return
this
[
0
]
&&
!
isNaN
(
ret
=
parseFloat
(
jQuery
.
css
(
this
[
0
],
type
,
margin
?
"margin"
:
"border"
))
)
?
ret
:
var
elem
=
this
[
0
]
;
return
elem
&&
elem
.
style
?
parseFloat
(
jQuery
.
css
(
elem
,
type
,
margin
?
"margin"
:
"border"
)
)
:
null
;
};
...
...
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