Examples of show (), hide (), and toggle () usage in jquery
This article mainly introduces the usage of show (), hide (), and toggle () in jquery, and analyzes show (), hide (), and toggle () as examples () show, hide, switch, and other application skills. For more information, see
This document describes how to use show (), hide (), and toggle () in jquery. Share it with you for your reference. The specific analysis is as follows:
The following describes jquery effects: show (), hide (), and toggle ().
Practical Application Scenario: My friend groups on the QQ panel
The Code is as follows:
<Html>
<Head>
<Title> jquery effect: show () method, hide () method, and toggle () method </title>
<Script type = "text/javascript" src = "jquery-1.8.2.min.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# Show"). click (function (){
$ ("P"). show ();
});
$ ("# Hide"). click (function (){
$ ("P"). hide (2000 );
});
$ ("# Tog"). click (function (){
$ ("P"). toggle ("slow ");
});
});
</Script>
</Head>
<Body>
<Button id = "show"> show </button> <button id = "hide"> hide </button> <button id = "tog"> switch </button>
<P> This is a paragraph. This is a paragraph. </p>
</Body>
</Html>
I hope this article will help you with jQuery programming.