JSFiddle - React, Tailwind, and code Playground

by Alen Doe

HTML

<div class="map">
  <div class="open">Открыть</div>
  <div class="hide">
      <div>
        <a href=""></a>
      </div>
      <div>
        <a href=""></a>
       </div>
      <div class="closed">Закрыть</div>
  </div>
</div>

<div class="map">
  <div class="open">Открыть</div>
  <div class="hide">
      <div>
        <a href=""></a>
      </div>
      <div>
        <a href=""></a>
      </div>
      <div class="closed">Закрыть</div>
    </div>
 </div>

CSS

.open {
  width: 50%;
  height: 10%;
  background-color: #6dae81;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
}

.hide {
  display: none;
  position: relative;
  height: 200px;
  width: 50%;
  background-color: #2f5e51;
}

.closed{
  width: 100%;
  height: 20px;
  position: absolute;
  bottom: 0;
  text-align: center;
  color: #fff;
  background-color: #000;
  cursor: pointer;
}

JavaScript

$('.map').find('.open').click(function() {
  $(this).next().show();
})
$('.hide').find('.closed').click(function() {
  $(this).parent('.hide').hide();
})