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
1ba0f9c3
Commit
1ba0f9c3
authored
Oct 07, 2011
by
Corey Frang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Effects - Allow queue: true - Fixes #10445
parent
cec0d0d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
effects.js
src/effects.js
+2
-2
effects.js
test/unit/effects.js
+21
-2
No files found.
src/effects.js
View file @
1ba0f9c3
...
@@ -352,8 +352,8 @@ jQuery.extend({
...
@@ -352,8 +352,8 @@ jQuery.extend({
opt
.
duration
=
jQuery
.
fx
.
off
?
0
:
typeof
opt
.
duration
===
"number"
?
opt
.
duration
:
opt
.
duration
=
jQuery
.
fx
.
off
?
0
:
typeof
opt
.
duration
===
"number"
?
opt
.
duration
:
opt
.
duration
in
jQuery
.
fx
.
speeds
?
jQuery
.
fx
.
speeds
[
opt
.
duration
]
:
jQuery
.
fx
.
speeds
.
_default
;
opt
.
duration
in
jQuery
.
fx
.
speeds
?
jQuery
.
fx
.
speeds
[
opt
.
duration
]
:
jQuery
.
fx
.
speeds
.
_default
;
//
if undefined, set to fx
//
normalize opt.queue - true/undefined/null -> "fx"
if
(
opt
.
queue
==
null
)
{
if
(
opt
.
queue
==
null
||
opt
.
queue
===
true
)
{
opt
.
queue
=
"fx"
;
opt
.
queue
=
"fx"
;
}
}
...
...
test/unit/effects.js
View file @
1ba0f9c3
...
@@ -390,6 +390,25 @@ asyncTest( "animate option { queue: false }", function() {
...
@@ -390,6 +390,25 @@ asyncTest( "animate option { queue: false }", function() {
equals
(
foo
.
queue
().
length
,
0
,
"Queue is empty"
);
equals
(
foo
.
queue
().
length
,
0
,
"Queue is empty"
);
});
});
asyncTest
(
"animate option { queue: true }"
,
function
()
{
expect
(
2
);
var
foo
=
jQuery
(
"#foo"
);
foo
.
animate
({
fontSize
:
"2em"
},
{
queue
:
true
,
duration
:
10
,
complete
:
function
()
{
ok
(
true
,
"Animation Completed"
);
start
();
}
});
notEqual
(
foo
.
queue
().
length
,
0
,
"Default queue is not empty"
);
});
asyncTest
(
"animate option { queue: 'name' }"
,
function
()
{
asyncTest
(
"animate option { queue: 'name' }"
,
function
()
{
expect
(
5
);
expect
(
5
);
var
foo
=
jQuery
(
"#foo"
),
var
foo
=
jQuery
(
"#foo"
),
...
@@ -652,7 +671,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
...
@@ -652,7 +671,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
duration
:
1000
,
duration
:
1000
,
complete
:
function
()
{
complete
:
function
()
{
equals
(
foo
.
width
(),
400
,
"Animation completed for standard queue"
);
equals
(
foo
.
width
(),
400
,
"Animation completed for standard queue"
);
equals
(
foo
.
height
(),
saved
,
"Height was not changed after the second stop"
)
equals
(
foo
.
height
(),
saved
,
"Height was not changed after the second stop"
)
;
start
();
start
();
}
}
});
});
...
@@ -673,7 +692,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
...
@@ -673,7 +692,7 @@ asyncTest( "stop( ..., ..., queue ) - Stop single queues", function() {
queue
:
"height"
queue
:
"height"
}).
dequeue
(
"height"
).
stop
(
false
,
false
,
"height"
);
}).
dequeue
(
"height"
).
stop
(
false
,
false
,
"height"
);
saved
=
foo
.
height
();
saved
=
foo
.
height
();
})
})
;
test
(
"toggle()"
,
function
()
{
test
(
"toggle()"
,
function
()
{
expect
(
6
);
expect
(
6
);
...
...
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