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
1d299d37
Commit
1d299d37
authored
Nov 16, 2007
by
David Serduke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1823 bug in animate {queue:false} plus a unit test.
parent
ab96367f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
fx.js
src/fx.js
+2
-1
fx.js
test/unit/fx.js
+23
-0
No files found.
src/fx.js
View file @
1d299d37
...
@@ -201,6 +201,7 @@ jQuery.extend({
...
@@ -201,6 +201,7 @@ jQuery.extend({
// Queueing
// Queueing
opt
.
old
=
opt
.
complete
;
opt
.
old
=
opt
.
complete
;
opt
.
complete
=
function
(){
opt
.
complete
=
function
(){
if
(
opt
.
queue
!==
false
)
jQuery
(
this
).
dequeue
();
jQuery
(
this
).
dequeue
();
if
(
jQuery
.
isFunction
(
opt
.
old
)
)
if
(
jQuery
.
isFunction
(
opt
.
old
)
)
opt
.
old
.
apply
(
this
);
opt
.
old
.
apply
(
this
);
...
...
test/unit/fx.js
View file @
1d299d37
...
@@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() {
...
@@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() {
});
});
});
});
test
(
"animate option (queue === false)"
,
function
()
{
expect
(
1
);
stop
();
var
order
=
[];
var
$foo
=
$
(
"#foo"
);
$foo
.
animate
({
width
:
'100px'
},
200
,
function
()
{
// should finish after unqueued animation so second
order
.
push
(
2
);
});
$foo
.
animate
({
fontSize
:
'2em'
},
{
queue
:
false
,
duration
:
10
,
complete
:
function
()
{
// short duration and out of queue so should finish first
order
.
push
(
1
);
}});
$foo
.
animate
({
height
:
'100px'
},
10
,
function
()
{
// queued behind the first animation so should finish third
order
.
push
(
3
);
isSet
(
order
,
[
1
,
2
,
3
]
);
start
();
});
});
test
(
"stop()"
,
function
()
{
test
(
"stop()"
,
function
()
{
expect
(
3
);
expect
(
3
);
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