title: How do I apply animations for previously selected Item
body: <p>I have a radio button and able to get the action/ animations on button click.
  And how I add an animation for the previously selected Item from the radio button group.</p>
  <p>Code is given blow,</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 radiobtn_clicked(radiobtn){
  console.log(radiobtn.value)
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.toggle-triple-switch label {
          display: inline-block;
          height: 30px;
          width: 50px;
          position: relative;
          border: 2px solid;
          justify-content: center;
         
      }
  
      
  .toggle-triple-switch .toggle-triple-switch__input:checked + .toggle-triple-switch__label{
  
         color: #FFFFFF;
         background-color: green;
         transform: scale(1);
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;div class="toggle-triple-switch" id="time-selector" dir="auto"&gt;
  
      &lt;input type="radio" id="time-now"class="toggle-triple-switch__input" name="time-select" value="now"
          checked onclick="radiobtn_clicked(this)"/&gt;
         &lt;label for="time-now" class="toggle-triple-switch__label" id="now-label"&gt;&lt;/label&gt;
          
      &lt;input type="radio" id="time-yesrtay"  class="toggle-triple-switch__input" name="time-select" value="yesterday" 
      checked onclick="radiobtn_clicked(this)"/&gt;
      &lt;label for="time-yesrtay" class="toggle-triple-switch__label" id="ysterday-label"&gt;&lt;/label&gt;
         
      &lt;input type="radio" id="time-tomorrow" class="toggle-triple-switch__input" name="time-select" value="tomorrow" 
      checked onclick="radiobtn_clicked(this)"/&gt;
      &lt;label for="time-tomorrow" class="toggle-triple-switch__label" id="tomorrow-label"&gt;&lt;/label&gt;
      
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://jsfiddle.net/so6wb3ft/53/" rel="nofollow noreferrer">Sample code in Jsfiddle</a></p>