title: Button inside popup doesn't trigger click event outside the popup
body: <p>I have a custom div like a checkbox to set a condition and also I have a pop up containing a button to trigger the condition.</p>
  
  <p>However, I dont know why, when triggering the click event of custom div from the button of the pop up. it doesn't work.</p>
  
  <p>It works fine if I trigger with a button outside the popup. </p>
  
  <p>Here is the demo of it:
  <a href="https://jsfiddle.net/yusrilmaulidanraji/ayLamku6/8/" rel="nofollow noreferrer">https://jsfiddle.net/yusrilmaulidanraji/ayLamku6/8/</a></p>
  
  <p>The green rectangle's color should be changed when the "Pop Up Trigger" button is clicked.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".simon-toggle-accepted, .simon-toggle-declined").on("click", function () {
      var value = $(this).data("value");
          var tr = $(this).closest("tr");
      if (value == "Accepted") {
              if ($(this).css("background-color") == "rgb(255, 255, 255)") { //white
                  $(this).css("background-color", "green");
                  $(this).siblings("div").css("background-color", "white");
              } else {
                  $(this).css("background-color", "white");
                  $(this).siblings("div").css("background-color", "white");
              }
          }
          else if (value == "Declined") {
              if ($(this).css("background-color") == "rgb(255, 255, 255)") { //white
                  $(this).css("background-color", "red");
                  $(this).siblings("div").css("background-color", "white");
              } else {
                  $(this).css("background-color", "white");
                  $(this).siblings("div").css("background-color", "white");
              }
          }
  });
  
  $("#trigger").on("click",function (e) {
   e.preventDefault();
   $(".simon-toggle-accepted").trigger("click");
    console.log("Test Trigger");
  });
  
  $("#dlg-opt-submit").on("click",function (e) {
   e.preventDefault();
    console.log("Test Popup Trigger");
   $(".simon-toggle-accepted").trigger("click");
    console.log($(".simon-toggle-accepted").length);
   $("#popupLogin").popup("close");
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.simon-toggle {
      width: 90px;
      height: 30px;
  }
  .simon-toggle-accepted {
      background-color: white;
      border: 1px solid green;
  }
  .simon-toggle-declined {
      background-color: white;
      border: 1px solid red;
  }
  .simon-toggle-ignored, .simon-toggle-accepted, .simon-toggle-declined {
      width: 30px;
      height: 30px;
      display: inline-block;
      border-radius: 2px;
      margin-left: 0.5px;
      margin-right: 0.5px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"&gt;&lt;/script&gt;
    
    
  &lt;div class="simon-toggle"&gt;
  &lt;div class="simon-toggle-accepted" data-value="Accepted"&gt;&lt;/div&gt;
  &lt;div class="simon-toggle-declined" data-value="Declined"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;button id="trigger"&gt;Trigger&lt;/button&gt;
  
  &lt;a href="#popupLogin" data-rel="popup" data-position-to="window" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-icon-check ui-btn-icon-left ui-btn-a" data-transition="pop"&gt;Pop Up&lt;/a&gt;
  &lt;div data-role="popup" id="popupLogin" data-theme="a" class="ui-corner-all"&gt;
      &lt;form&gt;
          &lt;div style="padding:10px 20px;"&gt;
              &lt;button type="submit" class="ui-btn ui-corner-all ui-shadow ui-btn-b "&gt;Pop Up Trigger&lt;/button&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>