title: changing pseudo class :before css in javascript for TD
body: <p>I have a css class for td as follows:</p>
  
  <pre><code>td {
      text-align: left;
      padding: 3px;
      color:white;
      background-color:#E3F2ED ;
      position:relative; 
      z-index:10; 
      border:1px solid #74827D;
      border-style:solid none;
  
  }
  
   td:before{
      content:""; 
      position:absolute; 
      z-index:-1; 
      top:2px; 
      left:2px; 
      right:2px; 
      bottom:2px; 
      background:#20936C;
  } 
  </code></pre>
  
  <p>This makes the individual cells with color <code>#20936C</code> and a border of color <code>#E3F2ED</code> and last border of color <code>#74827D</code>.</p>
  
  <p>Now I want to change the color of one cell when it is clicked. So basically I just want to change the <strong><code>:before</code></strong> color to let's say red.</p>