title: How to do Button Group selected and change color?
body: <p>I need to design buttons (I'm using bootstrap) in the Blazor project. I have 2 button groups on one Razor page. 3 to 4 buttons in each group. I want to use Javascript to change the color button which is onclick function.</p>
  <ol>
  <li><p>User will click any button from group 1 (when clicking change color to green) and click the button from group 2 without deselecting button from group 1.</p>
  </li>
  <li><p>The onclick call need to be here <code>&lt;div class=&quot;btn-group&quot;&gt;</code> because I already have onclick on my button<code>&lt;button type=&quot;button&quot;  class=&quot;btn btn-primary&quot; @onclick=&quot;() =&gt; UpdateTheChart(13)&quot;&gt;@Language.T37&lt;/button&gt;</code></p>
  </li>
  </ol>
  <p>I have tried <code>:focus</code> in CSS but only 1 button can be select.
  This is my code, I take out the onclick in button for test purposes.</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-css lang-css prettyprint-override"><code>.btn:hover {
    font-weight: bold;
    color: white;
    /*green*/
    background-color: #85c995;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row"&gt;
    &lt;div class="column" style="width:30%"&gt;
      &lt;div class="btn-group"&gt;
        &lt;button type="button" class="btn btn-primary" style="outline-color:red; "&gt;Sunday&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;Tuesday&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;Friday&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="column" style="width:70%"&gt;
      &lt;div class="btn-group"&gt;
        &lt;button type="button" class="btn btn-primary"&gt;9 am&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;2 pm&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;5 pm&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;8 pm&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>