JSFiddle - React, Tailwind, and code Playground
HTML
<div id="real-hint-1" class="real-hint">
<div class="prm-cross"></div>
<span class="hint-caption">Подсказка 1.</span><br/>
Вы нажали на первую ссылку
</div>
<ul>
<li class="real-show-hint" data-hint="#real-hint-1"></li>
</ul>
<div class="go">click here</div>
CSS
.real-hint {
background-color: #fff;
border: 1px solid #aaa;
border-radius: 10px;
display: none;
padding: 5px 10px;
position: absolute;
width: 250px;
z-index: 99;
}
.real-hint .hint-caption {
font-weight: bold;
text-transform: uppercase;
}
.real-hint .prm-cross {
background: url("/images/cross.jpg") no-repeat scroll right top rgba(0, 0, 0, 0);
cursor: pointer;
float: right;
height: 16px;
margin-top: 3px;
padding-left: 15px;
right: 10px;
width: 16px;
}
.real-show-hint {
cursor: pointer;
border-bottom: dashed 1px;
color: #8c0000;
}
JavaScript
$(document).ready(function() {
$(document).on('click', function(event){
var target = event.target;
if($(target).hasClass("go")){
$("#real-hint-1").show("fast");
}
else{
$("#real-hint-1").hide("fast");
}
});
});