JSFiddle - React, Tailwind, and code Playground
HTML
<div id="first">
我是第一個DIV
</div>
<div id="second" class="hidden">
我是第二個DIV,你想開美甲店嗎?
</div>
CSS
#first {
width: 100px;
height: 100px;
background-color: #00ff33;
}
#second {
width: 100px;
height: 100px;
background-color: #ff9355;
}
.hidden {
display: none;
}
JavaScript
$(function() {
$('#first').on('mouseover', function() {
$('#second').removeClass('hidden');
});
$('#first').on('mouseout', function() {
$('#second').addClass('hidden');
});
});