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

查看:52
本文介绍了手风琴中的 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

Sub One 到 Four 是另一个手风琴.

Where Sub One through Four is another accordion.

谢谢

推荐答案

只需为每个手风琴提供不同的 id 名称并在 jquery 函数中调用它们,您将不得不编辑 css 以获得想要的样子.

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();
  });

演示

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

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