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
6dd2dc42
Commit
6dd2dc42
authored
Sep 27, 2010
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the currentStyle property exists before attempting to access it.
parent
88fc523c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
css.js
src/css.js
+3
-3
No files found.
src/css.js
View file @
6dd2dc42
...
@@ -174,7 +174,7 @@ if ( !jQuery.support.opacity ) {
...
@@ -174,7 +174,7 @@ if ( !jQuery.support.opacity ) {
jQuery
.
cssHooks
.
opacity
=
{
jQuery
.
cssHooks
.
opacity
=
{
get
:
function
(
elem
,
computed
)
{
get
:
function
(
elem
,
computed
)
{
// IE uses filters for opacity
// IE uses filters for opacity
return
ropacity
.
test
((
computed
?
elem
.
currentStyle
.
filter
:
elem
.
style
.
filter
)
||
""
)
?
return
ropacity
.
test
((
computed
&&
elem
.
currentStyle
?
elem
.
currentStyle
.
filter
:
elem
.
style
.
filter
)
||
""
)
?
(
parseFloat
(
RegExp
.
$1
)
/
100
)
+
""
:
(
parseFloat
(
RegExp
.
$1
)
/
100
)
+
""
:
"1"
;
"1"
;
},
},
...
@@ -191,7 +191,7 @@ if ( !jQuery.support.opacity ) {
...
@@ -191,7 +191,7 @@ if ( !jQuery.support.opacity ) {
""
:
""
:
"alpha(opacity="
+
value
*
100
+
")"
;
"alpha(opacity="
+
value
*
100
+
")"
;
var
filter
=
style
.
filter
||
elem
.
currentStyle
.
filter
||
""
;
var
filter
=
style
.
filter
||
elem
.
currentStyle
&&
elem
.
currentStyle
.
filter
||
""
;
style
.
filter
=
ralpha
.
test
(
filter
)
?
style
.
filter
=
ralpha
.
test
(
filter
)
?
filter
.
replace
(
ralpha
,
opacity
)
:
filter
.
replace
(
ralpha
,
opacity
)
:
...
@@ -219,7 +219,7 @@ if ( getComputedStyle ) {
...
@@ -219,7 +219,7 @@ if ( getComputedStyle ) {
}
else
if
(
document
.
documentElement
.
currentStyle
)
{
}
else
if
(
document
.
documentElement
.
currentStyle
)
{
curCSS
=
function
(
elem
,
name
)
{
curCSS
=
function
(
elem
,
name
)
{
var
left
,
rsLeft
,
ret
=
elem
.
currentStyle
[
name
],
style
=
elem
.
style
;
var
left
,
rsLeft
,
ret
=
elem
.
currentStyle
&&
elem
.
currentStyle
[
name
],
style
=
elem
.
style
;
// From the awesome hack by Dean Edwards
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
...
...
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