将jQuery UI手风琴放在jQuery UI对话框中 [英] putting a jQuery UI Accordion in a jQuery UI Dialog

查看:93
本文介绍了将jQuery UI手风琴放在jQuery UI对话框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过为Tabs创建适当的标记,我已经能够将jQuery UI Tabs小部件放置在jQuery UI对话框中;但是对手风琴"执行相同操作无效:单击手风琴"部分的锚点将导致对话框关闭.有没有简单的方法可以做到这一点?

By creating the appropriate markup for Tabs, I've been able to place a jQuery UI Tabs widget inside a jQuery UI Dialog; but doing the same with an Accordion has not worked: clicking on the anchor of the accordion section causes the Dialog to close. Is there a straightforward way to accomplish this?

推荐答案

对我来说很好...我发布了一个演示为您.

Works fine for me... I posted a demo for you.

也许您需要在对话框功能中使用打开"选项?

Maybe you needed to use the "open" option in the dialog function?

  $(function() {
    $("#dialog-modal").dialog({
      height: 400,
      width: 400,
      modal: true,
      open: function(){
        $("#accordion").accordion({ autoHeight: true });
      }
    });
  });

注意:对于选项卡,基本上是同一回事,在open选项内添加函数调用.

Note: For tabs, it's basically the same thing, add the function call inside the open option.

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

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