0

am trying to change above div if below one is mouse hovered.

Here is my sample code

<div class="mainDiv">
<div class="a">Div A</div>
<div class="b">Div B</div>
</div>

.b:hover ~ .a {
    background: #ccc
}

if i mouse hover on b, a's background should be change without using jquery. I mean with simple javascript.

please give me an example

Vadapalli
  • 123
  • 8

0 Answers0