JSFiddle - React, Tailwind, and code Playground

https://teratail.com/questions/314047

by Lhankor_Mhy

HTML

<div class="header-contents-js">
    header-contents-js
    <div class="header-contents-detail">
        header-contents-detail
    </div>
</div>

CSS

.header-contents-js{
  background: pink;
}
.header-contents-detail{
  background: gold;
  display: none;
}

JavaScript

$(".header-contents-js").hover(
    function () {
      $(".header-contents-detail").stop().fadeIn(400);
    },
    function () {
          $(".header-contents-detail").stop().fadeOut(400);
    }
  )