title: jQuery binding issue inside pgwModal
body: <p>I am using a modal popup for Login, I have a username and password field only, and I am using the following code ---  </p>
  
  <pre><code> $(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');
                          }
                  });
             });
  </code></pre>
  
  <p>here is html:</p>
  
  <pre><code>&lt;div id="pgContent"&gt;
      &lt;form action="#" id="testForm"&gt;
      &lt;li&gt;&lt;input type="text" class="requiredxx" placeholder="user name"&gt;&lt;/li&gt;
      &lt;li&gt;&lt;input class="requiredxx" type="password" placeholder="password"&gt;&lt;/li&gt;
      &lt;input type="submit" value="Login"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>using this code, working, but when I check console, I can see It logs the length is  4, actually I have only 2 elements with '.requiredxx'. When I alert the error message, then also, It alerts 4 times when the fields are blank, I am using the above form inside pgwmodal(<a href="http://pgwjs.com/pgwmodal/" rel="nofollow noreferrer">http://pgwjs.com/pgwmodal/</a>). the modal code is this,</p>
  
  <pre><code>$('.testlink2').on('click', function() {
                  $.pgwModal({
                      target: '#pgContent',
                      maxWidth: 350,
                       titleBar: false
                  });
          });
  </code></pre>
  
  <p>Any Idea, why this happens??</p>
  
  <p>Oooops!  I found this question in SO, please refer this also, this says real issue is with PGWModal plugin, Link  -
  <a href="https://stackoverflow.com/questions/28714086/pgwmodal-using-a-trigger-option-duplicates-a-html-markup-of-a-content-of-a-moda">pgwModal: using a trigger option duplicates a HTML markup of a content of a modal in a page. How to get rid of duplication?</a></p>