jquery's ultra-simple div display and hide effects demo

Source: Internet
Author: User

Idle bored, see a video site on the div display and hide the effect, oneself also wrote a.

I think it's quite simple.

The front end changes the world! Hey, it's kinda a sense of accomplishment.

<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Untitled Document</title><Scriptsrc= "Jquery_last.js"type= "Text/javascript"></Script><Scripttype= "Text/javascript">$ (document). Ready (function(){});functionHiden () {$ ("#divObj"). Hide ();//Hide () function, implement hidden, parentheses can also take a time parameter (ms) such as Hide (2000) At 2000 milliseconds to hide the speed, you can also take Slow,fast}functionSlidetoggle () {$ ("#divObj"). Slidetoggle ( -);//the curtain effect of the switch, point a bit, click Open, Parameters can be no, parameter description ibid .}functionShow () {$ ("#divObj"). Show ();//Display, parameter description ibid.}functionToggle () {$ ("#divObj"). Toggle ( -);//Show hidden Toggle, parameter can be no, parameter description ibid .}functionSlide () {$ ("#divObj"). Slidedown ();//Curtain Effect unfold}</Script></Head><Body><H3>Display hidden effects for content in Div</H3><inputtype= "button"value= "hidden"onclick= "Hiden ()"/> <inputtype= "button"value= "Display"onclick= "Show ()"/> <inputtype= "button"value= "Curtain effect display 2"onclick= "Slide ()"/> <inputtype= "button"value= "Toggle of Curtain Effect"onclick= "Slidetoggle ()"/>  <inputtype= "button"value= "Hide display effect Toggle"onclick= "Toggle ()"/><DivID= "Divobj"style= "Display:none">1. Test examples<BR/>2. Test examples<BR/>3. Test examples<BR/>4. Test examples<BR/>5. Test examples<BR/>6. Test examples<BR/>7. Test examples<BR/>8. Test examples<BR/>9. Test examples<BR/>0. Test examples<BR/>    </Div></Body></HTML>

Just copy it to the HTML file and run it.

I don't have a server, so I can't pass the demo ....

jquery's ultra-simple div display and hide effects demo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.