Click after slowly pop-up drop-down menu effect code (commonly used in column management) _ navigation menu

Source: Internet
Author: User
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <meta name=" keywords "content=" webmaster, Web effects, JS special effects, advertising code, zzjs,jb51.net,sky,www.jb51.net, webmaster effects net "/ > <meta name= "description" content= "www.jb51.net,jb51.net, webmaster necessary JS special effects and advertising code. A large number of high-quality JS special effects, to provide high-quality advertising code to download, do in jb51.net "/> <title> click slowly pop-up Drop-down menu, Sky Collation Collection." </title> <script type=text/javascript> function $ (d) {return document.getElementById (d); }//Set or get the current display style of the DIV function DSP (d,v) {if (v==undefined) {return d.style.display; }else{D.style.display=v; }//Set or get the height of a div. function sh (d,v) {//If you are getting the height then display must is block to return the absolute height if (v==undefi Ned) {if (DSP (d)!= ' None ' && DSP (d)!= ') {return d.offsetheight; } viz = d.style.visibility; d.style.visibility = ' hidden '; o = DSP (d); DSP (d, ' block '); R = parseint (d.offsetheight); DSP (D,o); d.style.visibility = viz; return R; }else{D.style.height=v; }/* Variable ' S ' defines the speed of the accordian * Variable ' T ' defines the refresh rate the accordian * * s=7; t=10; The Collapse Timer is triggered as a setinterval to reduce the exponentially of the div. function ct (d) {d = $ (d); if (Sh (d) >0) {v = math.round (Sh (d)/d.s); v = (v<1)? 1:v; v = (SH (d)-V); SH (d,v+ ' px '); D.style.opacity = (V/D.MAXH); D.style.filter= ' alpha (opacity= ' + (V*100/D.MAXH) + '); '; }else{sh (d,0); DSP (D, ' none '); Clearinterval (D.T); }//expand Timer is triggered as a setinterval to increase the height of the div exponentially. Function ET (d) {d = $ (d); if (Sh (d) <d.maxh) {v = Math.Round ((d.maxh-sh (d))/d.s); v = (v<1)? 1:v; v = (Sh (d) +v); SH (d,v+ ' px '); D.style.opacity = (V/D.MAXH); D.style.filter= ' Alpha(opacity= ' + (V*100/D.MAXH) + '); '; }else{sh (d,d.maxh); Clearinterval (D.T); }///Collapse initializer function cl (d) {if (DSP (d) = = ' block ') {clearinterval (d.t); D.t=setinterval (' ct (' +d.id+ ') ', t); }}//expand initializer function ex (d) {if (DSP (d) = = ' None ') {DSP (d, ' block '); d.style.height= ' 0px '; Clearinterval (D.T); D.t=setinterval (' ET (' +d.id+ ') ', t); }//Removes Classname from the given Div. function cc (N,V) {s=n.classname.split (/\s+/); for (p=0;p<s.length;p++) {if (s[p]==v+n.tc) {s.splice (p,1); N.classname=s.join ("); Break }}//accordian initializer function Accordian (D,S,TC) {//Get all is elements that have ID as content l=$ (d). get Elementsbytagname (' div '); C=[]; for (i=0;i<l.length;i++) {h=l[i].id; if (H.substr (H.indexof (') +1,h.length) = = ' content ') {C.push (h);} } sel=null; Then search through headers for (i=0;i<l.length;i++) {h=l[i].id; if (H.substr (H.indexof (') +1,h.length) = = ' Header ') {d=$ (H.substr ('-')) + ' 0,h.indexofTent '); D.style.display= ' None '; d.style.overflow= ' hidden '; D.maxh =sh (d); D.s= (s==undefined)? 7:s; h=$ (h); H.TC=TC; H.c=c; Set the onclick function for each header. H.onclick = function () {for (i=0;i<this.c.length;i++) {cn=this.c[i]; N=cn.substr (0,cn.indexof ('-')); if ((n+ '-header ') ==this.id) {EX ($ (n+ '-content ')); n=$ (n+ '-header '); CC (n, ' __ '); N.classname=n.classname+ ' +n.tc; }else{Cl ($ (n+ '-content ')); CC ($ (n+ '-header '), '); }} if (H.classname.match (/selected+/)!=undefined) {sel=h;} } if (sel!=undefined) {Sel.onclick ();} } </script> <style type= "Text/css" > <!--body{font-size:12px; Color: #999999; Background-color: #000000; Font-family:arial, Helvetica, Sans-serif; Text-transform:capitalize; } * {margin:0px; padding:0px; Border:0px;list-style:none;} /* Menu Style * * #basic-accordian{width:20%; Z-index:2; margin-top:2%; Border-top-style:solid; Border-top-color: #999999; Border-bottom-style:solid; Border-bottOm-color: #666666; padding-top:15px; padding-bottom:15px; margin-bottom:2%; }/* Menu Background */accordion_headings{padding:2px; Color: #FFFFFF; Cursor:pointer; Font-weight:bold; font-size:14px; line-height:25px; letter-spacing:1px; }/* Menu Category Line */accordion_headings:hover{} accordion_child{padding-left:20px; padding-bottom:8px; }. Accordion_child ul{}. Accordion_child ul li{font-size:12px; Display:block; line-height:20px; Display:block; }. Accordion_child ul li a{text-decoration:none; Color: #666666; Accordion_child ul li a:hover{color: #FFFFFF; }. header_highlight{Background-color: #000000; Color: #FF0099; }/* Current display menu category style/////Menu style end//. main {margin-top:2%; width:96%; Margin-right:auto; Margin-left:auto; /* Special Style-------------------------/*--> </style> </pead> <body onload= "New Accordian" (' Basic-accordi An ', 5, ' header_highlight '); > ">jb51.net, webmaster must have high-quality web effects and advertising code. Jb51.net, webmaster JS special effects. <pr> <!--Welcome to JB51. NET, our site collects a large number of high-quality JS effects, providing many advertising code download--> <div class= "main" > <div id= "Basic-accordian" ><!--menu Start--> <div id= "Test-header" class= "accordion_headings" > Site home </div><!--1 News--> <div "id=" "> <div class=" accordion_child "> <ul><li> cloud Habitat </li> <li> Web effects </li> </ul> </div> </div> <div id= "Test1-header" class= "accordion_headings" > College Overview </div><!--2 College profile-- > <div id= "test1-content" > <div class= "accordion_child" > <ul><li> Advertising Code </li> <li& gt; web effects </li> <li> teaching facilities </li> <li> Liu Xiaoyang Principal Introduction </li> <li> excellent teachers </li> <li> Qualification and Honors </li> </ul> </div></div> <div id= "Test2-header" class= "Accordion_headings" > Professional Settings </div> <!--3 course settings--> <div id= "test2-content" > <div class= "accordion_child" > <ul> ;li> Image Design (college specialist) </li> <li> make-up styling </li>;li> beauty </li> <li> hair </li> <li> manicure </li> </ul></div></div> <div ID = "Test3-header" class= "accordion_headings" > International Diploma Course </div><!--4 International Diploma Course--> <div id= "Test3-content" > <div class= "accordion_child" > <ul><li>cidesco Saint-Disse brother </li> <li>city & Gulids International Beautician </li> &LT;LI&GT;CIBTAC International Beautician </li> &LT;LI&GT;SRH International hair stylist </li> <li>itec International professional fashion, stage, media makeup artist </li > </ul></div></div> <div id= "Test4-header" class= "accordion_headings" > Classic works of Teachers and students </div > <!--5 Works appreciation--> <div id= "test4-content" > <div class= "accordion_child" > <ul> <li> Image Design lt;/li> <li> makeup </li> <li> beauty </li> <li> hairdressing </li> <li> Manicure </li> </ ul> </div></div> <div id= "Test5-header" class= "Accordion_headings" > online video </div><!-- 6 School video--> <div id= "test5-content" > <div class= "accordIon_child "> <ul> <li> College Introduction video </li> <li> activity video </li> <li> Test scene video </li> </ul > </div></div> <div id= "Test6-header" class= "Accordion_headings" > Simone Elite student </div><!-- 7 Admissions Information--> <div id= "test6-content" > <div class= "accordion_child" > <ul> <li> message book </li> &L t;li> Image Design University graduates </li> <li>cidesco beauty doctor </li> <li> Age Witness of Excellence (1981-2000) </li> </ ul> </div></div> <div id= "Test7-header" class= "accordion_headings" > Admissions Information </div><!-- 8 Enrollment information--> <div id= "test7-content" > <div class= "accordion_child" > <ul> <li>2008 Year Enrollment brochure </li > <li> Enrollment </li> <li> registration notice </li> <li> Online registration </li> </ul> </div></div > <div id= "test8-header" class= "Accordion_headings" > Advisory message </div><!--8 online consultation--> <div " Test8-content "> <div class=" accordion_child "> <ul> <li> message book </li> <li> FAQ </li> <li> Online message </li> <li> Contact Us </li> </ Ul> </div></div> </div><!--menu End--> </div><!--main end--> </body> </ Html>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

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.