barakuda,
пока так , если успею доделаю - просто могу сейчас убежать.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" >
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<style>
span {
background-color: dimgrey;
color: white;
border-radius: 3px;
cursor: pointer;
}
.tooltip {
position: fixed;
padding: 10px 20px;
/* красивости... */
border: 1px solid #b3c9ce;
border-radius: 4px;
text-align: center;
font: italic 14px/1.3 arial, sans-serif;
color: #333;
background: #fff;
box-shadow: 3px 3px 3px rgba(0, 0, 0, .3);
}
</style>
</head>
<body>
<p>1</p>
<p>My family <span>to at</span> big. Lorem ipsum dolor sit amet, con <span>to at</span> adipisicing elit. Quod similique
est, autem
<span>to at</span> voluptatem ipsam error eius rumquam non soluta aut impedit dolor magnam, exerci- tationem
blanditiis voluptatibus praesentium id, recusandae. </p>
<script>
$('span').click(function (event) {
var target = event.target;
if(target.tagName != 'SPAN') return;
if(target.className == 'tooltip') return;
var input = document.createElement('input');
input.value = 'Hello';
target.parentNode.insertBefore(input,target);
target.className = 'tooltip';
document.body.appendChild(target);
var coords = input.getBoundingClientRect();
var left = coords.left + (input.offsetWidth - target.offsetWidth) / 2;
var top = coords.top - target.offsetHeight - 5;
target.style.left = left + 'px';
target.style.top = top + 'px';
})
</script>
</body>
</html>