JQuery 如何在对话框中添加手风琴
我默认隐藏一个对话框,当用户单击页面中的按钮时,会出现该对话框,并且对话框内有一个手风琴。手风琴出现,但手风琴的每个部分似乎并不完整。它没有完全显示每个手风琴部分内的文本。它只显示第一行。
$('#helpx').hide();
$('#accord').accordion({ header: 'h3' });
$('#helpbutton').click(function() {
if ( $('#helpx').is(':visible') == false ) {
$('#helpx').show().dialog({height: 600, width:550, dialogClass: 'shadowme', position: [390,130]});
}
else { $('#helpx').dialog('close'); }
});
请记住,手风琴位于 html 对话框的标签内。例如
<div id="helpx" title="Sistema de Ayuda">
<div id="accord">
I have a dialog hidden by default that when the user clicks in a button in the page, the dialog appears and inside the dialog there is a accordion. The accordion appears BUT each section of the accordion does not appear complete. It does not show the text inside each accordion section completely. It just shows the first line.
$('#helpx').hide();
$('#accord').accordion({ header: 'h3' });
$('#helpbutton').click(function() {
if ( $('#helpx').is(':visible') == false ) {
$('#helpx').show().dialog({height: 600, width:550, dialogClass: 'shadowme', position: [390,130]});
}
else { $('#helpx').dialog('close'); }
});
Remember that the accordion is inside the tags of the dialog in the html. For instance
<div id="helpx" title="Sistema de Ayuda">
<div id="accord">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎对我来说效果很好,但我们确实需要
在这里查看您的代码一个工作演示
this seems seems to work fine for me but we really need to see your code
here is a working demo