This article mainly introduces the use of animate in jquery, the example analyzes the usage of animate, has a certain reference value, the need of friends can refer to the
This example describes the animate usage in jquery. Share to everyone for your reference. Specifically as follows:
This is a simple animate function attempt. The code is as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19-20 |
<script type= "Text/javascript" > $ (document). Ready (function () {$ (". Side-box h3"). Toggle (function () {$ (this). AddClass ("Box-arrow"); $ (this). Next (". Side-text"). Animate ({height: ' Toggle ', opacity: ' Toggle '}, "slow"); return false; },function () {$ (this). Next (". Side-text"). Animate ({height: ' Toggle ', opacity: ' Toggle '}, "slow"); $ (this). Removeclass ("Box-arrow"); return false; }); }); </script> |
I hope this article will help you with your jquery programming.