jQuery addClass example

Change class name on click in jQuery

HTML

<div class="hotspot-wrp">
  <div class="hot-spot" style="top:43.8776%; left:4.4476%;">
    <div class="tooltip">
      <h3>Test</h3>
      <p>Some demo text will be in here.</p>
    </div>
  </div>
  <div class="hot-spot" style="top:4.0816%; left:63.4146%;">
    <div class="tooltip">
      <h3>Test</h3>
      <p>Some demo text will be in here.</p>
    </div>
  </div>  
</div>

CSS

body {
  margin: 50px 100px;
  padding: 0px;
  background: #dfe6e9;
}

.hotspot-wrp{
  display: block;
  position: relative;
  background: #636e72;
  width: 80vw;
  margin: 0px auto;
  height: 200px;
}

.hot-spot{
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(227, 193, 122, 0.8);
  position: absolute;
  cursor: pointer;
  transition: all ease 350ms;
  margin-left: -12px;
  margin-top: -12px;
}

.tooltip{
  position: absolute;
  background: #fff;
  border: 1px solid #E8C378;
  width: 100%;
  padding: 15px;
  display: none;
  margin-top: 30px;
  -webkit-transform: translateX(0%);
  transform: translateX(0%);
  z-index: 9999;  
}

.hot-spot:hover .tooltip, .hot-spot:active .tooltip{
  display: block;
}