Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.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
Javascript pgwModal内部的jQuery绑定问题_Javascript_Jquery_Data Binding_Popup_Pgwmodal - Fatal编程技术网

Javascript pgwModal内部的jQuery绑定问题

Javascript pgwModal内部的jQuery绑定问题,javascript,jquery,data-binding,popup,pgwmodal,Javascript,Jquery,Data Binding,Popup,Pgwmodal,我使用模式弹出窗口登录,我只有用户名和密码字段,我使用以下代码- $(document).on("submit", "#testForm", function(e) { e.preventDefault(); console.log($('#testForm .requiredxx').length); $('.requiredxx').each(function() { va

我使用模式弹出窗口登录,我只有用户名和密码字段,我使用以下代码-

 $(document).on("submit", "#testForm", function(e) {
            e.preventDefault();
            console.log($('#testForm .requiredxx').length);
             $('.requiredxx').each(function() {
                      var $this = $(this);
                      if($this.val() == ''){
                            console.log('blank');
                        }
                });
           });
以下是html:

<div id="pgContent">
    <form action="#" id="testForm">
    <li><input type="text" class="requiredxx" placeholder="user name"></li>
    <li><input class="requiredxx" type="password" placeholder="password"></li>
    <input type="submit" value="Login">
    </form>
</div>
你知道为什么会这样吗

哎呀!我在中发现了这个问题,请也参考这个,这说明真正的问题是PGWModal插件,Link-

如果您打开页面源代码并搜索.requiredxx,您会看到多少次?您可以添加testForm的html代码吗?我已经用html更新了问题,请查看此链接-
$('.testlink2').on('click', function() {
                $.pgwModal({
                    target: '#pgContent',
                    maxWidth: 350,
                     titleBar: false
                });
        });