'Bootstrap tooltip not working with ejs

I am adding the tooltips and I added the script that i see is needed to invoke the tooltip. Also, i am cdn bootstrap popper and jquery. I am working with an ejs file. Is there something that I am missing or is there better way to invoke this so that I can use the tooltips?

This is the script I am loading

<script>
    $(function () {
        $('[data-toggle="tooltip"]').tooltip();
    });
</script>

This is the tooltip I am working on

This is the tooltip i am trying to get working
<li class="list-group-item list-group-item-action list-group-item-success">
    <i class="fas fa-check" data-toggle="tooltip" data-placement="bottom" title="This does not include the deposit required and will not be refunded for any reason"></i> Satisfaction Guaranteed <i class="fas fa-info info"></i></li>


Solution 1:[1]

Do you try to change your JavaScript function ?

var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
  return new bootstrap.Tooltip(tooltipTriggerEl)
})

link to doc : https://getbootstrap.com/docs/5.0/components/tooltips/#example-enable-tooltips-everywhere

It should work with bootstrap 5. Take care that "data-toggle" is now "data-bs-toggle"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Art_Arnaud