title: On submit, load a html popup file into a div
body: <p>I am trying to redirect to a contact form on submit to a HTML file which I have made using.</p>
  <pre><code>header('Location: /dev/thanks.html');
  </code></pre>
  <p>However, this loads it to a different page and not to the page that I'm already on.</p>
  <p>I already have the jQuery to make a popup for the contact form and information page, which is:</p>
  <pre><code>$('a.contact , a.contact_footer, a.contact_text').click(function() {
      $(&quot;html, body&quot;).animate({ scrollTop: 0 }, 600);
      $(&quot;#popup&quot;).load(&quot;/dev/contact.php&quot;);
      // Getting the variable's value from a link
      var show = $('#popup').css('display', 'block'),
      popup = $(this).attr('href');
  
      //Fade in the Popup and add close button
      $(popup).fadeIn(300);
      
      // Add the mask to body
      $('body').append('&lt;div id=&quot;mask&quot;&gt;&lt;/div&gt;');
      $('#mask').fadeIn(300);
      
      return false;
  </code></pre>
  <p>On submitting the contact form, I want to load a new file (thanks.html) to replace the popup (contact form) with a thank-you message. Similar to what I'm doing with the jQuery already, but I want it to only implement on submit:</p>
  <pre><code>&lt;div class=&quot;submit&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&gt;
  &lt;/div&gt;
  </code></pre>
  <p>What do I need to do to modify my jQuery so it implements on submit instead of on click?</p>