<div id="bg01">01</div>
<div id="bg02">02</div>
<div id="bg03">03</div>
<div id="bg04">04</div>
div {
  display: inline-block;
  padding: 18px;
  margin: 10px;
  border: 1px solid #cccccc;
}
$(function(){
  
  $('#bg01').mouseover(function () {
    $(this).css("background-color","#333333");
  });
  
  $('#bg02').mouseover(function () {
    $(this).css("background-color","#666666");
  });
  
  $('#bg03').mouseover(function () {
    $(this).css("background-color","#999999");
  });
  
  $('#bg04').mouseover(function () {
    $(this).css("background-color","#cccccc");
  });
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js