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
4eef88cf
Commit
4eef88cf
authored
Jan 20, 2012
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit tests for animation toggling from hide position. Supplements #10848.
parent
e8673ae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
effects.js
test/unit/effects.js
+23
-6
No files found.
test/unit/effects.js
View file @
4eef88cf
...
...
@@ -1146,13 +1146,15 @@ jQuery.each({
},
function
(
method
,
defProp
)
{
test
(
method
+
"().stop()."
+
method
+
"()"
,
function
()
{
expect
(
4
);
expect
(
8
);
var
animTime
=
100
;
jQuery
.
each
([
"in"
,
"out"
],
function
(
i
,
type
)
{
var
$elem
=
jQuery
(
"#"
+
method
.
toLowerCase
()
+
type
),
startVal
=
defProp
(
$elem
);
$elem
[
method
](
"fast"
);
$elem
[
method
](
animTime
);
stop
();
setTimeout
(
function
()
{
...
...
@@ -1160,11 +1162,26 @@ function( method, defProp ) {
notEqual
(
defProp
(
$elem
),
startVal
,
".stop() is called about halfway through animation."
);
$elem
[
method
](
"fast"
,
function
()
{
equal
(
defProp
(
jQuery
(
this
)
),
startVal
,
"After doing .stop() halfway, check that state has been saved for returning to original property value."
);
start
();
$elem
[
method
](
animTime
,
function
()
{
equal
(
defProp
(
$elem
),
startVal
,
"After doing .stop() halfway through hide, check that state has been saved for returning to original property value."
);
// Start from hidden position to show this time
$elem
.
hide
()[
method
](
animTime
);
setTimeout
(
function
()
{
$elem
.
stop
();
notEqual
(
defProp
(
$elem
),
startVal
,
".stop() is called about halfway through animation."
);
$elem
[
method
](
animTime
,
function
()
{
equal
(
defProp
(
$elem
),
startVal
,
"After doing .stop() halfway through show, check that state has been saved for returning to original property value."
);
// Remove olddisplay data from .hide() call
jQuery
.
removeData
(
this
,
"olddisplay"
,
true
);
start
();
});
},
animTime
/
2
);
});
},
100
);
},
animTime
/
2
);
});
});
});
...
...
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