zoukankan      html  css  js  c++  java
  • jQuery 二级菜单,一次显示一个小类 鼠标点击显示小类

    jQuery 二级菜单,一次显示一个小类 鼠标点击显示小类

     本例有另外2个关联案例,演示地址分别为2.php,3.php

    jQuery 二级菜单,一次显示一个小类 鼠标点击显示小类

     

    XML/HTML Code
    1. <div class="arrowlistmenu">  
    2.   
    3. <h3 class="menuheader expandable">表单</h3>  
    4. <ul class="categoryitems">  
    5. <li><a href="1/">Horizontal CSS Menus</a></li>  
    6. <li><a href="2/">Vertical CSS Menus</a></li>  
    7. <li><a href="4/">Image CSS</a></li>  
    8. <li><a href="6/">Form CSS</a></li>  
    9. </ul>  
    10.   
    11. <h3 class="menuheader expandable">导航菜单</h3>  
    12. <ul class="categoryitems">  
    13. <li><a href="">CSS Gallery</a></li>  
    14. <li><a href="">Menu Gallery</a></li>  
    15. <li><a href="">Web Design News</a></li>  
    16. <li><a href="">CSS Examples</a></li>  
    17. <li><a href="">CSS Compressor</a></li>  
    18. <li><a href="">CSS Forums</a></li>  
    19. </ul>  
    20.   
    21. <h3 class="menuheader expandable">分页</h3>  
    22. <ul class="categoryitems">  
    23. <li><a href="#" >Free JavaScripts</a></li>  
    24.   
    25. </ul>  
    26.   
    27. </div>  

     

    JavaScript Code
    1. <script type="text/javascript">  
    2.   
    3.   
    4. ddaccordion.init({  
    5.     headerclass: "expandable"//Shared CSS class name of headers group that are expandable  
    6.     contentclass: "categoryitems"//Shared CSS class name of contents group  
    7.     revealtype: "click"//Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"  
    8.     mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover  
    9.     collapseprev: true//Collapse previous content (so only one open at any time)? true/false   
    10.     defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content  
    11.     onemustopen: false//Specify whether at least one header should be open always (so never all headers closed)  
    12.     animatedefault: false//Should contents open by default be animated into view?  
    13.     persiststate: true//persist state of opened contents within browser session?  
    14.     toggleclass: ["""openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]  
    15.     togglehtml: ["prefix"""""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)  
    16.     animatespeed: "fast"//speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"  
    17.     oninit:function(headers, expandedindices){ //custom code to run when headers have initalized  
    18.         //do nothing  
    19.     },  
    20.     onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed  
    21.         //do nothing  
    22.     }  
    23. })  
    24.   
    25.   
    26. </script>  

     


    原文地址:http://www.freejs.net/article_daohangcaidan_146.html
  • 相关阅读:
    Codeforces Round #408 (Div. 2) C
    Codeforces Round #408 (Div. 2) B
    Codeforces Round #408 (Div. 2) A
    我眼中的Linux设备树(五 根节点)
    我眼中的Linux设备树(四 中断)
    我眼中的Linux设备树(三 属性)
    我眼中的Linux设备树(二 节点)
    我眼中的Linux设备树(一 概述)
    为什么你应该(从现在开始就)写博客
    LCD正向扫描和反向扫描
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/3765987.html
Copyright © 2011-2022 走看看