I’ve included bootstrap-twipsy.js 1.3.0 and copied twipsy’s css from bootstrap.css on my site. But the twipsy’s effect won’t work . When I include the bootstrap.css, twipsy work fine. I just need the twipsy’s css, not bootstrap’s css. Here’s the css:
.twipsy {
display: block;
position: absolute;
visibility: visible;
padding: 5px;
font-size: 11px;
z-index: 1000;
filter: alpha(opacity=80);
-khtml-opacity: 0.8;
-moz-opacity: 0.8;
opacity: 0.8;
}
.twipsy.fade.in {
filter: alpha(opacity=80);
-khtml-opacity: 0.8;
-moz-opacity: 0.8;
opacity: 0.8;
}
.twipsy.above .twipsy-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #000000;
}
.twipsy.left .twipsy-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #000000;
}
.twipsy.below .twipsy-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #000000;
}
.twipsy.right .twipsy-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #000000;
}
.twipsy-inner {
padding: 3px 8px;
background-color: #000000;
color: white;
text-align: center;
max-width: 200px;
text-decoration: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.twipsy-arrow {
position: absolute;
width: 0;
height: 0;
}
and the fiddle : http://jsfiddle.net/FArIZzX77/4Fz5T/
You’ve missed in some ways the most important CSS property the show/hide part using the opacity
Working fiddle with this CSS added: http://jsfiddle.net/4Fz5T/1/
When you move mouse in, the Tool-tip gets prepended to body and it gets class=”twipsy fade in” The in gets removed on the hide function of the tool-tip making it invisible (opacity=0). Please note that its not removing the element from DOM.