I use the code as follows:
$(\".reply\").popover({
content: \"Loading...\",
placement: \"bottom\"
});
$(\".reply\").popover(\"toggle\");
algun nombre
$('a.Evaluar').on('click', function () {
var a=$(this);//.attr('data-content', "mañana");
$.ajax({
url: "../IndicadorControlador?accion=BuscarPorProceso&cP=24",
type: 'POST',
dataType: 'json'
})
.done(function (response) {
//alert("done. ");
var ind = "";
$(response).each(function (indice, elemento) {
//alert(elemento.strIdentificador);
//console.log('El elemento con el índice ' + indice + ' contiene ' + elemento.strIdentificador.toString());
ind += ''+elemento.strIdentificador.toString()+'';
});
$(a).attr('data-content', ind);
})
.fail(function () {
sweetAlert("ERROR!", " Algo salió mal en el controlador!", "error");
})
.complete(function () {
});
$('[data-toggle="popover"]').popover();
});