0
I’m trying to use Tooltip with Bootstrap 4, but it just doesn’t show up:
In HTML it looks like this:
<a class="btn btn-sm btn-warning" href="" data-toggle="tooltip" data-placement="top" title="Editar"><i class="fa fa-edit"></i></a>
Page end after JS files:
<script type="text/javascript">
$(document).ready(function() {
$('#bootstrap-data-table-export').DataTable();
$('[data-toggle="tooltip"]').tooltip()
} );
</script>
I am using jquery 3.3.1, but I already used version 2.1.4 too and it didn’t work. Another detail is that when I add the Tooltip settings, the title that appeared before ceases to appear.
RESOLVED:
I managed to solve it in a way I didn’t quite understand... I took the tooltip() function from the html file, I used it after adding all JS. I put it together with an external JS file (main.js) and it worked. Thanks to all who contributed!
Is your HTML dynamic? Is there an error in the browser console? Why does Tooltip work normally in this scenario. Here is an example: https://jsfiddle.net/0sw67k3n/
– Netinho Santos
Hello, the table where the buttons are, is generated with PHP when loading the page.
– Reginaldo Boeke
Any errors in the console? Edit the question and enter the scripts you are using.
– Netinho Santos