I'm using twitter bootstrap 3
to display tooltip
<td class = "skills" data-toggle="tooltip" data-placement="left" data-original-title="<?php echo $row['skills']; ?>"><?php echo $row['skills']; ?></td>
and it shows well but when I hover on it, it shift each cell to right.
how to fix that?
I've attached two snapshots and you can see it's shifting towards right.
Edit
I'm adding a test table here, what it does, displays tooltip in next td
and data of that td
shifted right.
<table id="example-table" class="table table-striped table-hover table-condensed">
<thead>
<th>Serial</th>
<th>Name</th>
<th>Rating</th>
</thead>
<tbody>
<tr>
<td>1</td>
<td data-toggle="tooltip" data-placement="right" data-original-title="A">A</td>
<td>php</td>
</tr><tr>
<td>2</td>
<td data-toggle="tooltip" data-placement="right" data-original-title="B">B</td>
<td>C#</td>
</tr>
</tbody>
</table>
and here is js
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
I found the solution, just posting here so that someone may find this useful some day.
So, anyone if faces this issue, I mean if moving data around on hover and buttons bounce on hover while using twitter-bootstrap tooltip
, you just need to do the following:
Previous
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
just need to add container(fixed in bootstrap 2.3)
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
});
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With