<h1>Clickable Tooltip</h1>
<ul>
<li>
Test1
<div>
Tooltip <a href="#">test</a>
</div>
</li>
<li>
Test2
<div>
Tooltip2 <input type="button" value="Click Me"/>
</div>
</li>
</ul>
h1{
text-align:center;
background:#1d1d1d;
color:#fff;
margin:0;
padding:10px;
font-family:arial;
font-weight:200;
}
ul{
position:relative;
cursor:default;
}
li{
list-style:none;
padding:10px;
color:#fff;
font-family:arial;
background:#1884BC;
border-radius:5px;
width:200px;
margin:15px;
display:inline-block;
}
ul li div{
background:#1d1d1d;
color:#fff;
padding:7px;
border-radius:5px;
position:absolute;
min-width:50px;
max-width:300px;
display:none;
}
ul div:before{
content:'';
height:3px;
width:0;
border:7px solid transparent;
border-bottom-color:#1d1d1d;
position:absolute;
top:-16px;
left:14px;
}
div a{
color:#1884BC;
text-decoration:none;
}
$('ul li').mouseenter(function(){
var pos = $(this).position();
$(this).find('div').css('top', (pos.top)+50 + 'px').fadeIn();
}).mouseleave(function(){
$(this).find('div').fadeOut();
});
This Pen doesn't use any external CSS resources.