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
a63754aa
Commit
a63754aa
authored
Jan 19, 2010
by
Karl Swedberg
Committed by
John Resig
Jan 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for show/hide with falsy, non-zero values
parent
21441b1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
effects.js
test/unit/effects.js
+24
-5
No files found.
test/unit/effects.js
View file @
a63754aa
module
(
"effects"
);
test
(
"show()"
,
function
()
{
expect
(
16
);
expect
(
23
);
var
pass
=
true
,
div
=
jQuery
(
"#main div"
);
div
.
show
().
each
(
function
(){
if
(
this
.
style
.
display
==
"none"
)
pass
=
false
;
});
ok
(
pass
,
"Show"
);
pass
=
true
;
div
.
hide
().
show
(
null
).
each
(
function
()
{
if
(
this
.
style
.
display
==
"none"
)
pass
=
false
;
var
speeds
=
{
"null speed"
:
null
,
"undefined speed"
:
undefined
,
"empty string speed"
:
""
,
"false speed"
:
false
};
jQuery
.
each
(
speeds
,
function
(
name
,
speed
)
{
pass
=
true
;
div
.
hide
().
show
(
speed
).
each
(
function
()
{
if
(
this
.
style
.
display
==
"none"
)
pass
=
false
;
});
ok
(
pass
,
"Show with "
+
name
);
});
jQuery
.
each
(
speeds
,
function
(
name
,
speed
)
{
pass
=
true
;
div
.
hide
().
show
(
speed
,
function
()
{
pass
=
false
;
});
ok
(
pass
,
"Show with "
+
name
+
" does not call animate callback"
);
});
ok
(
pass
,
"Show will null speed"
);
jQuery
(
"#main"
).
append
(
'<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>'
);
...
...
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