title: jQuery hide/show DIV function not working
body: <p>I'm loading data via AJAX/jQuery using an API. I want one div to show and the other to hide when I click the button, but I'm not able to get that working with the code I have, any ideas?</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>$(function() {
    $("button").click(function() {
      $(".groups").show("");
    });
    $(".matches").hide("");
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.groups {
    display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;button&gt;Click me&lt;/button&gt;
  &lt;div class="groups"&gt;
    &lt;p&gt;test&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="matches"&gt;
    &lt;p&gt;test 2&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Obviously, for this I've taken out the AJAX/jQuery for simplicity, but the data would be loaded into the div's provided.</p>