JS

The popoverTrigger.js is a custom script to enable a better open close behaviour. The function popoverTrigger can take any kind of jQuery selector as parameter. It is not necessary to have the popover trigger in the DOM on the function call time. It will listen on the body for any click events on the given selectors and open/close the popover.

$(function () {
$.popoverTrigger('[data-toggle="popover"]');
});

Resources

The popover.js depends on the tooltip.js so we need to load both and the popoverTrigger.js.