(1) Functional description
In the page, click the Show connection, animate a picture by showing the display () method, and execute a callback function in the method to change the border style of the picture, and when you click the displayed picture, the picture is animated by using hide ().
(2) Implementation code
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Animation way Slowly show
jquery Hide (), show () method usage detailed
Grammar
$ (selector). Hide (Speed,callback)
Speed with three effect parameters • milliseconds (e.g. 1500)
• "Slow"
• "Normal"
• "Fast"
In the case of setting the speed, the element will gradually change its height, width, outer margin, inner margin, and transparency as it is visible to the hidden process.
Cases
This is a super simple display and hidden, if you want to have the effect we just have time or parameters in hide or show
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ (". Btn1"). Click (function () {
$ ( "P"). Hide (1000);
$ (". Btn2"). Click (function () {
$ ("P"). Show (1000);
}
); </script>
Finally, it summarizes the display hiding effect of a show,hide implementation
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
The above is a small compilation to share with you in jquery use Show () and Hide () methods to animate and hide pictures, I hope you like.