JQuery UI 手风琴故障
我正在使用 JQuery UI 1.6rc5,但在使用手风琴小部件时遇到了一些麻烦。 这是我正在使用的代码。
<script>
$(document).ready(function(){
$('#find-panel').accordion({
header:"h3",
autoHeight:true,
alwaysOpen: false,
});
});
</script>
<div id="find-panel" class="ui-accordion" style="width:450px;">
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href = "#">
I know a Material
</a>
</h3>
<div class="ui-accordion-content">
<p>Enter a part number</p>
</div>
</div>
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href="#">
I know a Tag
</a>
</h3>
<div class="ui-accordion-content">
<p>Enter a tag name</p>
</div>
</div>
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href="#">
I know an Issue
</a>
</h3>
<div class="ui-accordion-content">
<p> Enter an issue id number</p>
</div>
</div>
</div>
我遇到的问题是这段代码在 Safari 中无法正常工作。 具体来说,div.ui-accordion-content 标记中的内容无法正确呈现。 如果我在样式中指定高度,safri 工作正常。
我已经能够在 FF 中测试上面的确切代码,并且工作正常。 有其他人在 Safari 中遇到过这个问题吗?您是如何解决的?
I'm working with JQuery UI 1.6rc5 and I'm having a bit of trouble using an accordion widget. Here's the code I'm using.
<script>
$(document).ready(function(){
$('#find-panel').accordion({
header:"h3",
autoHeight:true,
alwaysOpen: false,
});
});
</script>
<div id="find-panel" class="ui-accordion" style="width:450px;">
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href = "#">
I know a Material
</a>
</h3>
<div class="ui-accordion-content">
<p>Enter a part number</p>
</div>
</div>
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href="#">
I know a Tag
</a>
</h3>
<div class="ui-accordion-content">
<p>Enter a tag name</p>
</div>
</div>
<div class="ui-accordion-group">
<h3 class="ui-accordion-header">
<a href="#">
I know an Issue
</a>
</h3>
<div class="ui-accordion-content">
<p> Enter an issue id number</p>
</div>
</div>
</div>
The problem I have is that this code doesn't work right in Safari. Specifically, the content in the div.ui-accordion-content tags doesn't get rendered properly. If I specify the height in the style, safri works fine.
I've been able to test the exact code above it in FF, and it works fine. Has anyone else seen this issue with Safari, and how did you solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,当我在最后一个对象属性后面的对象中留下额外的逗号时,Safari 总是让我感到窒息,就像您的示例一样(在
alwaysOpen: false
之后)Well, Safari always chokes on me when I leave an extra comma in an object after the last object property like in your example (after
alwaysOpen: false
)