title: How to display a circle within a td by adding a class?
body: <p>I have a table and I would like to change a class on the <code>td</code> by clicking them. When I <code>addClass()</code> each cell changes but it seems override any class.</p>
  
  <p>My desired result for each cell is like this:</p>
  
  <p><a href="https://i.stack.imgur.com/yQLQF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yQLQF.png" alt="enter image description here"></a></p>
  
  <p>How can I achieve this by adding a class to them?</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() {
    $("td").click(function() {
      $(this).addClass('outpatient');
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>table td {
    width: 20px;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
    border: 1px solid gray;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    background-color: aqua;
  }
  
  .outpatient {
    background-color: yellow;
    border-radius: 50%;
  }</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;table&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;4&lt;/td&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;6&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;8&lt;/td&gt;
      &lt;td&gt;9&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>