jQuery UI手风琴中的手风琴 [英] jQuery UI Accordion in Accordion

查看:116
本文介绍了jQuery UI手风琴中的手风琴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以用jQuery UI将手风琴嵌入另一个手风琴中?

Is it possible to have an accordion embedded in another accordion with jQuery UI?

-Item One
-Item Two
-Item Three
  --Sub One
  --Sub Two
  --Sub Three
-Item Four

第一至第四小节是另一个手风琴.

Where Sub One through Four is another accordion.

谢谢

推荐答案

只需为每个手风琴赋予不同的id名称,并在jquery函数中调用它们,就必须编辑css以获得所需的外观. /p>

Just give different id names for each accordion and call them in the jquery function an you would have to edit the css to get the desired look though.

$(function() {
    $( "#accordion,#accordion2" ).accordion();
  });

演示

DEMO

这篇关于jQuery UI手风琴中的手风琴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆