Jquery's super simple div display and hide special effect demo, jquerydiv special effect demo
I am bored. I wrote one myself when I saw the DIV display and hiding effects on a video website.
I think it is quite simple.
Frontend changes the world! Hey, you have a sense of accomplishment.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head> <meta http-equiv =" Content-Type "content =" text/html; charset = UTF-8 "/> <title> untitled document </title> <script src =" jquery_last.js "type =" text/javascript "> </script> <script type =" text/javascript "> $ (document ). ready (function () {}); function hiden () {$ ("# divObj "). hide (); // The hide () function to hide data. A time parameter (millisecond) can also be included in the brackets. For example, hide (2000) can be hidden at a speed of 2000 milliseconds, it can also contain slow, fast} function slideToggle () {$ ("# divObj "). slideToggle (2000); // switch the curtain effect. Click close and open. The parameter can be left blank. The parameter description is the same as above} function show () {$ ("# divObj "). show (); // display, parameter description above} function toggle () {$ ("# divObj "). toggle (2000); // display hidden switchover. The parameter can be left blank. The parameter description is the same as above} function slide () {$ ("# divObj "). slideDown (); // curtain effect expansion} </script>
Copy the file to the HTML file and run it.
I don't have a server, so I can't pass the DEMO ....
A simple jquery html example for hiding a div.
You asked me in the morning. It's a js version, as shown in the following figure. It's changed to jquery,
Jquery is relatively simple. Remember to reference jquery. js:
<Head> <title> find a simple jquery html example to show hidden div </title> <script src = "jquery-1.7.1.min.js"> </script> <script type = "text/ javascript "> function showDiv () {// display all div $ ("div "). show ();} function showDiv1 () {$ ("# div1 "). show ();} function hideDiv () {// hide all div $ ("div "). hide () ;}</script>
JQuery hiding and display problems. I only need to display a DIV, and all other divs must be hidden. Code, thanks
The four divs in the drop-down list are bound to the same class and different IDs. Click bind class when the event is clicked to disable all Divs, and then output the drop-down menu by binding a unique id, I just wrote the code on the local machine and implemented it using the above method. I personally feel that there are other more convenient methods for implementation.
Html:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "www.w3.org/..al.dtd">