title: How to change CSS property using JavaScript
body: <p>I want to change a CSS property of a class using JavaScript. What I actually want is when a <code>&lt;div&gt;</code> is hovered, another <code>&lt;div&gt;</code> should become visible.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.left,
  .right {
    margin: 10px;
    float: left;
    border: 1px solid red;
    height: 60px;
    width: 60px
  }
  
  .left:hover,
  .right:hover {
    border: 1px solid blue;
  }
  
  .center {
    float: left;
    height: 60px;
    width: 160px
  }
  
  .center .left1,
  .center .right1 {
    margin: 10px;
    float: left;
    border: 1px solid green;
    height: 60px;
    width: 58px;
    display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="left"&gt;
    Hello
  &lt;/div&gt;
  &lt;div class="center"&gt;
    &lt;div class="left1"&gt;
      Bye
    &lt;/div&gt;
    &lt;div class="right1"&gt;
      Bye1
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="right"&gt;
    Hello2
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>When hello1 div is hovered, bye1 div should be visible and similarly bye2 should appear when hello2 is hovered.</p>