title: Click function not working in this code
body: <p>I have JQuery included and all my other click functions work. I have tried to debug and change it from class to ID and both the class and ID name is unique (no other element uses the class or ID).</p>
  
  <pre><code>&lt;button type="button" style="margin-left: 5px; padding: 7px;" class="btn query-btn"&gt; Search Transactions &lt;/button&gt;
  </code></pre>
  
  <p>Here is my code for the HTML and my JQuery is:</p>
  
  <pre><code> $(".query-btn").click(function () {
              alert("gets here");
   });
  </code></pre>
  
  <p>I literally have no idea why this isn't working because it works on everything else. Could anyone possibly point me the right direction? I have tried giving it an ID (unique) and changing the <code>.</code> to a <code>#</code> and that does not work either and yes it is wrapped in a:</p>
  
  <p><code>$(document).ready(function () {</code></p>
  
  <p>I receive no errors which is what is sort of confusing me. Anything would be appreciated!</p>
  
  <p>Note: The HTML button is actually added by AJAX (A button is pressed and the response is directly inserted using the <code>innerHTML</code>), not default page load. I'm not sure if this would effect it but just a note incase it does. </p>