热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

jquery手风琴只有少数可扩展-jqueryaccordiononlyafewexpandable

howcanidoanaccordionmenuwithonlyafewoptionsexpandable?Iwanttohaveamenu我怎么能只用几个可扩展

how can i do an accordion menu with only a few options expandable? I want to have a menu

我怎么能只用几个可扩展的选项来做手风琴菜单?我想要一份菜单

Home,Support,Sales,Other

Home has nothing in it, its just a link. so when you click on home, no expansion happens, it just does whatever i tell the links to do.

家里什么都没有,它只是一个链接。所以当你点击home时,没有发生扩展,它只会做我告诉链接做的事情。

Support/Sales/Other have a few options in it. the options themselves will be links.

支持/销售/其他有几个选项。选项本身将是链接。

$(function() {
  $( ".leftMenu" ).accordion({
     heightStyle: "content",
     active: false,
     collapsible: true,
  });
 });

 

  • Home
  • Support

    • New Tickets
    • Existing Tickets
    • Contact

    Other

  • stuff
  • stuff
  • if i dont add a div under each H3, it gets all confused.

    如果我不在每个H3下添加一个div,它会让所有人感到困惑。

    fiddle

    1 个解决方案

    #1


    1  

    It seems that accordion needs the div after the h element for it

    似乎手风琴需要h元素之后的div

    For example with this html it will work as expected

    例如,使用此html,它将按预期工作

    Home

    Support

    • New Tickets
    • Existing Tickets
    • Contact

    Other

  • stuff
  • stuff
  • Fiddle

    Description: Convert a pair of headers and content panels into an accordion. Accordion Docs

    描述:将一对标题和内容面板转换为手风琴。手风琴文件


    推荐阅读
    author-avatar
    dasgsdfsddsadas_501
    这个家伙很懒,什么也没留下!
    Tags | 热门标签
    RankList | 热门文章
    PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
    Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有