-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Effects Tests: Add shake visual test and Correct scale visual test #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>jQuery UI Effects Test Suite</title> | ||
<link rel="stylesheet" href="effects.css"> | ||
<script src="../../../external/jquery/jquery.js"></script> | ||
<script src="../../../ui/effect.js"></script> | ||
<script src="../../../ui/effect-scale.js"></script> | ||
<script src="../../../ui/effect-shake.js"></script> | ||
<script> | ||
$(function() { | ||
$( "#btn" ).click(function() { | ||
$( ".shake" ).effect( "shake", { | ||
duration: +$( "#duration" ).val(), | ||
mode: "toggle" | ||
}); | ||
}); | ||
}); | ||
</script> | ||
<style> | ||
#inputbox { | ||
background: green; | ||
} | ||
#selectbox { | ||
background: red; | ||
} | ||
#divbox { | ||
background: yellow; | ||
} | ||
#inputbox_abs { | ||
background: orange; | ||
position: absolute; | ||
top: 500px; | ||
left: 300px; | ||
} | ||
#divbox_abs { | ||
background: purple; | ||
position: absolute; | ||
top: 500px; | ||
left: 500px; | ||
} | ||
div.shake { | ||
background: lightblue; | ||
} | ||
|
||
.margin { | ||
margin: 3px; | ||
} | ||
.border { | ||
border: 1px solid black; | ||
} | ||
.padding { | ||
padding: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<p>WHAT: A set of elements with various box-model properties, using the shake effect to toggle.</p> | ||
<p>EXPECTED: When clicking "Toggle", all elements should not change dimension nor position, aside from the expected shake animation, which should take the number of milliseconds specified to complete. At the end of the animation, all elements should hide.</p> | ||
<p>EXPECTED: Clicking "Toggle" a second time reverses the animation, first showing all elements at their original dimensions, and restoring them to their original state.</p> | ||
|
||
<button id="btn">Toggle</button> | ||
<input id="duration" value="1000"> | ||
<div id="divbox"> | ||
<div class="shake margin">test</div> | ||
<div class="shake border">test</div> | ||
<div class="shake padding margin">test</div> | ||
</div> | ||
<div id="inputbox" class="margin"> | ||
<div class="shake margin">test</div> | ||
<div class="shake margin border">test</div> | ||
<div class="shake padding">test</div> | ||
<input type="text" class="shake" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No closing slash. |
||
</div> | ||
<div id="selectbox"> | ||
<div class="shake">test</div> | ||
<div class="shake">test</div> | ||
<div class="shake">test</div> | ||
<select class="shake"> | ||
<option value="a">a</option> | ||
<option value="abcdef">abcdef</option> | ||
</select> | ||
</div> | ||
<div id="inputbox_abs" class="margin"> | ||
<div class="shake margin">test</div> | ||
<div class="shake margin border">test</div> | ||
<div class="shake padding">test</div> | ||
<input type="text" class="shake" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No closing slash. |
||
</div> | ||
<div id="divbox_abs" class="margin"> | ||
<div class="shake margin">test</div> | ||
<div class="shake margin border">test</div> | ||
<div class="shake padding">test</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdent all the rules and the closing tag.