Accordian 无法处理我的所有数据
我正在使用这个插件链接文本第三个。 .3:非手风琴(标准可扩展菜单),每个 li 看起来像这样
<li>
<a href="#">Burswood Dome - Burswood Wa, Australia</a>
2010-10-04
<ul class="acitem">
<br><input id="yes_song1" name="yes" type="radio" value="song[1]" />
Yes
<br><input id="no_song1" name="no" type="radio" value="song[1]" />
No
<li>master of puppets</li>
</ul>
</li>
手风琴不工作的任何原因,因为如果我只使用 li 与文本它工作正常......
I am using this according plugin link text the 3rd one down...3: Non-accordion (standard expandable menu) and each li looks like this
<li>
<a href="#">Burswood Dome - Burswood Wa, Australia</a>
2010-10-04
<ul class="acitem">
<br><input id="yes_song1" name="yes" type="radio" value="song[1]" />
Yes
<br><input id="no_song1" name="no" type="radio" value="song[1]" />
No
<li>master of puppets</li>
</ul>
</li>
Any reason why the accordion is not working because if i use just li with text it works fine...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要确保 LI 是 UL 元素的唯一子元素。此外,即使您不应该将
br
元素作为ul
的直接子元素,您也应该编写
而不是
。You need to make sure that LIs are the only children of the UL element. Also, even though you shouldn't have a
br
element as a direct child of aul
, you should write<br />
instead of<br>
.脚本损坏的原因是 http://jqueryui.com/demos/accordion/
因此它应该是交替元素,一个用于标题,一个用于内容。我的是一对 div,带有 css 类名 accHeader 和 accContent,如下所示:
我的手风琴工作得很好。另外,请记住,您可以在 div 中嵌套任何您想要的内容。包括
The reason why the script is breaking is because http://jqueryui.com/demos/accordion/
So it should be alternating elements, one for a header, one for content. Mine is a pair of divs, with css class names accHeader and accContent, like thus:
And my accordion works just fine. Also, bear in mind that you can nest whatever you want inside a div. Including
<br />
s我遇到了同样的问题,但就我而言,这是因为我使用了通常的“脚本管理器”而不是使用“工具包脚本管理器”。尝试交换,它可能会正常工作。另外,如果我是对的,“工具包脚本管理器”是“脚本管理器”的超集
希望我能够提供帮助。
I had the same problem but in my case it was because I had used the usual 'Script Manager" instead of using the "Toolkit Script Manager". Try swapping and it might work fine. Also if I am right 'Toolkit Script Manager' is the superset of 'Script Manager'
Hope I was able to help.