#output 0

.item
  .item-top
  .item-center
  .item-bottom
View Compiled
#output {
  font-weight: 700;
  font-family: sans-serif;
  font-size: 40px;
  color: red;
}

.item {
  max-width: 300px;
  margin: 20px auto;
  background: #e6e6e6;
  
  > div {
    margin-bottom: 20px;
    min-height: 40px;
  }
  
  &-top {
    background: green;
  }
  &-center {
    background: yellow;
  }
  &-bottom {
    background: red;
  }
  
}
View Compiled
var i = 0;
$('.item').on('mouseover',function(){
  i++;
  $('#output').html(i);
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js