title: Page reloading when using jQuery?
body: <p>So I am currently trying to code my page to allow hidden divs to appear based on pressing buttons.
  I know that my code works, the first button pressed shows the hidden div. But when I press the second button it momentarily displays and then reloads the page. I don't want it to reload.</p>
  
  <pre><code> &lt;script&gt;
          $(document).ready(function () {
              $(".button1").click(function () {
                  $(".new-post-mid").css("display", "block");
              });
          });
      &lt;/script&gt;
      &lt;script&gt;
          $(document).ready(function () {
              $(".button2").click(function () {
                  $(".new-post-mid2").css("display", "block");
              });
          });
      &lt;/script&gt;
      &lt;/div&gt; &lt;!-- navbar --&gt;
      &lt;div class="new-post-outer"&gt;
          &lt;div class="new-post-outish"&gt;
              &lt;button class="button1"&gt;Edit your account details&lt;/button&gt;
              &lt;li&gt; Fields marked with an asterisk (*) are required.&lt;/li&gt;
          &lt;/div&gt;
          &lt;div class="new-post-mid"&gt;
              &lt;form class="abc"&gt;
                  &lt;label&gt; Please enter your password to change your settings.&lt;/label&gt;
                  &lt;label&gt; Password: &lt;/label&gt;
                  &lt;label&gt; Repeat Password: &lt;/label&gt;
                  &lt;label&gt; Please complete the captcha: &lt;/label&gt;
                  &lt;button class="button2"&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;div class="new-post-mid2"&gt;
              &lt;form class=abc&gt;
                  &lt;label&gt; Username: (*) &lt;/label&gt;
                  &lt;label&gt; Email Address: (*) &lt;/label&gt;
                  &lt;label&gt; First Name: &lt;/label&gt;
                  &lt;label&gt; Last Name: &lt;/label&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;&lt;!-- new-post-outer--&gt;
  </code></pre>