JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/Craga89/qTip2/master/dist/jquery.qtip.js"></script>
<ul style="float:right;">
<li class="myLiStyle" data-description="A home page">Home</li>
<li class="myLiStyle" data-description="An about page">About</li>
<li class="myLiStyle" data-description="A team page">Team</li>
<li class="myLiStyle" data-description="A contact page">Contact</li>
</ul>
CSS
/*!
* qTip2 - Pretty powerful tooltips - v2.0.1-47-
* http://qtip2.com
*
* Copyright (c) 2013 Craig Michael Thompson
* Released under the MIT, GPL licenses
* http://jquery.org/license
*
* Date: Fri Mar 29 2013 10:35 GMT+0000
* Plugins: svg ajax tips modal viewport imagemap ie6
* Styles: basic css3
*/
/* Core qTip styles */
.myLiStyle {
width :200px;
}
.qtip {
position: absolute;
left: -28000px;
top: -28000px;
display: none;
max-width: 280px;
min-width: 50px;
font-size: 10.5px;
line-height: 12px;
direction: ltr;
box-shadow: none;
padding: 0;
}
.qtip-content {
position: relative;
padding: 5px 9px;
overflow: hidden;
text-align: left;
word-wrap: break-word;
}
.qtip-titlebar {
position: relative;
padding: 5px 35px 5px 10px;
overflow: hidden;
border-width: 0 0 1px;
font-weight: bold;
}
.qtip-titlebar + .qtip-content {
border-top-width: 0 !important;
}
/* Default close button class */
.qtip-close {
position: absolute;
right: -9px;
top: -9px;
cursor: pointer;
outline: medium none;
border-width: 1px;
border-style: solid;
border-color: transparent;
}
.qtip-titlebar .qtip-close {
right: 4px;
top: 50%;
margin-top: -9px;
}
* html .qtip-titlebar .qtip-close {
top: 16px;
}
/* IE fix */
.qtip-titlebar .ui-icon, .qtip-icon .ui-icon {
display: block;
text-indent: -1000em;
direction: ltr;
vertical-align: middle;
}
.qtip-icon, .qtip-icon .ui-icon {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
text-decoration: none;
}
.qtip-icon .ui-icon {
width: 18px;
height: 14px;
line-height: 14px;
text-align: center;
text-indent: 0;
font: normal bold 10px/13px Tahoma, sans-serif;
color: inherit;
background: transparent none no-repeat -100em -100em;
}
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
.qtip-focus {
}
/*...
JavaScript
$(function () {
$(".myLiStyle").on("mouseover", function () {
var description = $(this).data("description");
var text = $(this).text();
$(this).qtip({
content: {
text: description,
title: text
},
show: {
event: false, // Don't specify a show event...
ready: true // ... but show the tooltip when ready
},
position: {
my: "right center",
at: "left center"
},
style: {
classes: "qtip-shadow qtip-bootstrap",
tip: {
width: 10,
height: 10
}
}
});
});
});