Home >Web Front-end >JS Tutorial >4 simple ways to show and hide with Jquery_jquery

4 simple ways to show and hide with Jquery_jquery

WBOY
WBOYOriginal
2016-05-16 17:24:01967browse

Html code:

Copy code The code is as follows:

Study World



  • 1111111111
  • 2222222222
  • 333333333

  • 4444444444
  • >
  • 6666666666< /li>




Jquery code:
First implementation method:


Copy code The code is as follows: 1.



The second implementation method:


Copy code The code is as follows: 2.



The third implementation method:

You can use show and hide provided by Jquery to complete the display and hide effects with easing. Since the two methods are similar, you can use toggle directly to complete.

Copy code The code is as follows: 3.



The fourth implementation method:

toggle If there are two parameters and both are functions, it means the first Click to execute the first function, and click the second to execute the second function.

Copy code The code is as follows: 4.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn