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
343b0936
Commit
343b0936
authored
Jul 25, 2009
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for animating hyphenated CSS properties. Fixes #4156.
parent
fd0bf5d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
fx.js
src/fx.js
+8
-0
fx.js
test/unit/fx.js
+12
-0
No files found.
src/fx.js
View file @
343b0936
...
@@ -109,6 +109,14 @@ jQuery.fn.extend({
...
@@ -109,6 +109,14 @@ jQuery.fn.extend({
self
=
this
;
self
=
this
;
for
(
p
in
prop
)
{
for
(
p
in
prop
)
{
var
name
=
p
.
replace
(
rdashAlpha
,
fcamelCase
);
if
(
p
!==
name
)
{
prop
[
name
]
=
prop
[
p
];
delete
prop
[
p
];
p
=
name
;
}
if
(
prop
[
p
]
==
"hide"
&&
hidden
||
prop
[
p
]
==
"show"
&&
!
hidden
)
if
(
prop
[
p
]
==
"hide"
&&
hidden
||
prop
[
p
]
==
"show"
&&
!
hidden
)
return
opt
.
complete
.
call
(
this
);
return
opt
.
complete
.
call
(
this
);
...
...
test/unit/fx.js
View file @
343b0936
...
@@ -100,6 +100,18 @@ test("animate duration 0", function() {
...
@@ -100,6 +100,18 @@ test("animate duration 0", function() {
});
});
});
});
test
(
"animate hyphenated properties"
,
function
(){
expect
(
1
);
stop
();
jQuery
(
"#nothiddendiv"
)
.
css
(
"font-size"
,
10
)
.
animate
({
"font-size"
:
20
},
200
,
function
(){
equals
(
this
.
style
.
fontSize
,
"20px"
,
"The font-size property was animated."
);
start
();
});
});
test
(
"animate non-element"
,
function
(){
test
(
"animate non-element"
,
function
(){
expect
(
1
);
expect
(
1
);
stop
();
stop
();
...
...
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