Toggles the visibility of all matching elements by the height change, and optionally triggers a callback function after the switch is complete;
This animation effect only adjusts the height of the element, allowing the matching elements to be hidden or displayed in a "swipe" manner. In jquery 1.3, the upper and lower padding and margin will also be animated, with smoother results
Instance:
;} Html{font:15px/1.2em ' Courier New '; color: #666; width:750px;margin:25px auto;} #show {width:250px;height:400px;background:red;display:none;color: #FFF; line-height:400px;text-indent:8px; padding:10px 30px;margin:70px;text-Align:center;} Button{padding:8px;border:0;outline:none;background: #00E92C; border-radius:2px;} . Wrapall{color: #FF96EC;}</style><script type= ' Text/javascript ' > $(function(){ $(' button '). Click (function(){ $(' #show '). Slidetoggle (' linear ',function(){ varnum = 0; Console.log (Num++); }); }); });</script>
[jquery effect Slidetoggle ([SPEED,[EASING],[FN]]) This method is used to slide show hidden selected elements