How to implement the Toggle method in jQuery

Xiaobian to share with how to implement the Toggle method in jQuery, I hope everyone will read this article, let us discuss together!

We know using jQuery to implement up and down, you can use the slideup () and slidedown () methods directly.

The slideup () method and slidedown () method will only change the height of the element. If an element’s Display property value is “None”, this element will extend from the up to bottom when the slidedown () method is called. The slideup () method is exactly the opposite, and the elements will shrink by top to bottom.

   TOGGLE-jQuery1.9    p.container {height: 320px; border: 1px solid #ccc;} p.Left {width: 200px; height: 300px; Background-color: # 36f;}       Toggle   $ (document) .ready (Function () {$ ('# Toggle'). Click (Function () {$ ('. Left'). Slidetoggle (300);};}); 

DEMO is as follows

TOGGLE-jQuery1.9

P. Conta; border: 1px solid #ccc;} p.Left {width: 200px; height: 300px; background-color: # 36f;}

  Toggle   $ (file) .ready (Function () {$ ('# Toggle'). Click (Function () {$ ('. Left'). Animate ( {Width: 'Toggle'}, 350);});};     After reading this article, I believe what you are in jQuery Implementing the Toggle method has a certain understanding, you want to know more related knowledge, welcome to pay attention to Tumi Yun Industry Information Channel, thank you for reading!                      
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment