Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 从jqModal打开另一个弹出窗口_Jquery_Popup - Fatal编程技术网

Jquery 从jqModal打开另一个弹出窗口

Jquery 从jqModal打开另一个弹出窗口,jquery,popup,Jquery,Popup,我正在使用jqModal创建一个弹出窗口,我有一个主弹出窗口。单击“确定”后,我必须关闭该窗口并打开另一个弹出窗口。我如何做到这一点 我的问题是单击事件不起作用。当我按下一个按钮{#b}时,除此之外,我还必须打开另一个弹出窗口 我的代码 $().ready(函数()){ $('#ex3a').jqm( {触发器:'#ex3aTrigger', 覆盖:30, overlayClass:'Overlay'}).jqDrag('.jqDrag'); $('input.jqmdX').hover(函数

我正在使用jqModal创建一个弹出窗口,我有一个主弹出窗口。单击“确定”后,我必须关闭该窗口并打开另一个弹出窗口。我如何做到这一点

我的问题是单击事件不起作用。当我按下一个按钮{#b}时,除此之外,我还必须打开另一个弹出窗口

我的代码

$().ready(函数()){
$('#ex3a').jqm(
{触发器:'#ex3aTrigger',
覆盖:30,
overlayClass:'Overlay'}).jqDrag('.jqDrag');
$('input.jqmdX').hover(函数(){$(this.addClass('jqmdXFocus');},
函数(){$(this.removeClass('jqmdXFocus');})
.focus(函数(){this.hideFocus=true;
$(this.addClass('jqmdXFocus');})
.blur(函数(){$(this).removeClass('jqmdXFocus');});
$(“#b”)。单击(函数(){
警报(“你好”);});
});
对话
[对话标题]
欢迎页面

好啊
尝试设置
$(“#b”)。单击jqModal的onShow回调中的

碰巧我遇到了这个问题以及7年前发布的问题。现在我们有很多插件和引导设计,这变得非常容易


请重新格式化代码,使其更清晰。使用stackoverflow编辑器上的“代码”按钮。
<html>
    <head>
        <script src="jquery-latest.js" type="text/javascript"></script>
        <script src="jqModal.js" type="text/javascript"></script>
        <script type="text/javascript">
            $().ready(function() {
                $('#ex3a').jqm(
                { trigger: '#ex3aTrigger',
                  overlay: 30,
                  overlayClass: 'Overlay'}) .jqDrag('.jqDrag');

            $('input.jqmdX') .hover( function(){ $(this).addClass('jqmdXFocus'); },
            function(){ $(this).removeClass('jqmdXFocus'); })
                .focus( function(){ this.hideFocus=true;
                    $(this).addClass('jqmdXFocus'); })
                .blur( function(){ $(this).removeClass('jqmdXFocus'); });
            $("#b").click(function () {
                alert("hello"); });
            });
        </script>
    </head>
    <body>
        <a href="#" id="ex3aTrigger">
           view</a> dialog
        <div id="ex3a" class="jqmDialog">
            <div class="jqmdTL">
                <div class="jqmdTR">
                    <div class="jqmdTC jqDrag">[Dialog Title] </div>
                </div>
            </div>
            <div class="jqmdBL">
                <div class="jqmdBR">
                    <div class="jqmdBC">
                        <div class="jqmdMSG"> Welcome Page <br/> <br/>
                            <div id="b"> <button> OK </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>