我正在尝试将选项卡放入手风琴中
我从 jQueryUI 网站下载了手风琴和选项卡。非常简单的东西 - 我自己并没有真正进行任何编程,只是将选项卡嵌套在手风琴中。
现在,这些选项卡对于默认的手风琴(加载时显示的那个)工作得很好,但当您单击手风琴的另一个窗格时,它们不会显示在手风琴中。有人能帮我解决这个问题吗?
谢谢!
如果您需要更多信息,请告诉我。我是个大菜鸟。
I downloaded the accordion and tabs from the jQueryUI website. Pretty simple stuff - didn't really do any programming of my own, just nested the tabs within the accordion.
Now, the tabs work just fine for the default accordion (the one that appears onload) but they will not show up within the accordion when you click on another pane of the accordion. Could anyone help me with this problem?
Thanks!
Let me know if you need more info. I am a big noobie.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个小提琴
我怀疑它对你不起作用的原因是因为选项卡需要有唯一的 ID。
由于有多个“选项卡”部分,我给了它们一类选项卡而不是 id,这样您就可以在初始化选项卡时选择所有选项卡。
你的 JS 看起来就像这样。
你的 HTML 看起来像这样
Check out this fiddle
I suspect the reason it wasn't working for you is because the tabs need to have unique id's.
Since there are multiple "tab" sections, I gave them a class of tabs instead of an id, that way you can select all of them when you initialize the tabs.
Your JS would simply look like this.
Your HTML would look like this