title: Jquery click event not firing on previously hidden div
body: <p>I am loading a 'password-reset-success-message' div into a 'password-reset' div dynamically as shown in the below snippet.<strong>The 'password-reset-success-message' div is hidden on page  load</strong> and is overwritten to the 'password-reset' div as shown below.</p>
  
  <pre><code>    $("#password-reset").html($("#password-reset-success-message").html());
  </code></pre>
  
  <p>Now the  'password-reset-success-message' div has a 'btnPasswordResetOK' button which will close the password reset modal dialog.But this click() event is not getting binded. I am not getting the alert message. I am doing all of this wrapped inside the document ready.</p>
  
  <pre><code>     $(document).ready(function(){  
  
         $("#btnPasswordResetOK").click(function() {
  
           alert();
         });
  
      });
  </code></pre>
  
  <p>Note: <a href="https://stackoverflow.com/questions/13048509/jquery-event-on-initially-hidden-popup">This question is almost similar to my question.</a>.but there are not answers for it.</p>
  
  <p><strong>UPDATE :</strong>  I binded after updating the html with the hidden div and it works ! , code snippet below </p>
  
  <pre><code>      $("#password-reset").html($("#password-reset-success-message").html());
  
         $("#btnPasswordResetOK").click(function() {
  
              alert();
         });
  </code></pre>