$(“#dialog”).parent().appendTo($(“form:first”));

随声附和 提交于 2019-12-01 04:43:53

Better one-

$('#dialog2').dialog({
      open:function(){{
         $(this).parent().appendTo($("form:first"));
      }}
});

$('#dialog3').dialog({
      open:function(){{
         $(this).parent().appendTo($("form:first"));
     }}
});

Ok, I now appear to have both buttons working i.e. going through the code behind both buttons. I put the "appendTo" calls in the functions that open the dialogs...

        $('#edit-notes').click(function() {
            $('#dialog2').dialog('open');
            $("#dialog2").parent().appendTo($("form:first"))
            return false;
        });

        $('#attachments').click(function() {
            $('#dialog3').dialog('open');
            $("#dialog3").parent().appendTo($("form:first"))
            return false;
        });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!