Show animations
Take one of the following code examples:
<!doctype html> . box{ width:200px; height:200px; Background-color: #ff6700; Display:none; } </style>There are three ways to show animations
Way One:
<script type= "Text/javascript" src= "jquery.js" ></script> <script type= "Text/javascript" > $ (". Box"). Show (); </script>
Explanation: Using show (), without parameters, means that the specified element is displayed directly.
In fact, the bottom of this method is through Display:block;
Way two:
<script type= "Text/javascript" src= "jquery.js" ></script><script type= "Text/javascript" > // gradually show in 3 seconds $ (". Box"). Show (+); </script>
Explanation: Use Show (value) to indicate that it is gradually displayed within a certain period of time.
This method is implemented by controlling the width, transparency, and display properties of the element.
Way three:
<script type= "Text/javascript" src= "jquery.js" ></script><script type= "Text/javascript" > $ (function () { $ (". Box"). Show ("Slow"); }) </script>
Explanation: By using the show () parameter, the parameters can be:
(1) Slow (slow): 600ms;
(2) Normal (normal): 400ms;
(3) Fast (FAST): 200ms;
Calling show () in this way is also accomplished by the width, transparency, and display properties of the control element that is empty.
Add: After the animation is finished, another program is executed
<script type= "Text/javascript" src= "jquery.js" ></script> <script type= "Text/javascript" > $ (function () { $ (function () { alert ("completion of animation") }); }) </script>
Explanation: In this way, a function is added to show (), which executes when show () finishes executing.
This function can be added in the form one, the way two, the way three.
The display animation of jquery animation