El problema que estoy teniendo es que al crearse el popover mediante Jquery se crea un botón para luego poder ocultar el popover. Al hacerle click, el popover no se me cierra y no se si es porque no reconoce el popover o por si la acción está mal programada. En la consola no me sale absolutamente ningún error.
$('[data-toggle="popover"]').popover({
html: true,
content: `
<div class="container mt-2 d-flex justify-content-end">
<button class="btn" id="btnClose"><img src="imagenes/borrar.png"/></button>
</div>
<table class = "table">
<thead class = "thead-dark">
<tr>
<th scope = "col">Siendo Usado</th>
<th scope = "col">Frecuencia</th>
</tr>
</thead>
<tbody>
<tr>
<td>Programación</td>
<td>3</td>
</tr>
</tbody>
</table>
`
}).click(function(e) {
$(this).popover('toggle');
e.preventDefault();
});
//ACION DEL BOTON PARA OCULTAR AL POPOVER
$('#btnClose').click(function(e) {
$('.[data-toggle="popover"]').popover('hide');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>