Bootstrap popover content does get updated every button click

39 Views Asked by At

I have bootstrap popover it shows dynamic content but never gets updated after 1st message. It still preserves and keeps showing 1st message. Not the updated dynamic message.

 $('[data-toggle="popover"]').popover({
    html: true,
    title: 'Error Details',
    content: function () {
    var result = $();
    /*for (var i in resultCountries) {*/
    // result = result.add(('<span>' + i + ' &ndash; ' + resultCountries[i] + '<span/><br/>'));
    result = result.add(('<table class="table table-striped table-bordered table-hover"><thead><tr><th scope="col" class="col-xs-3 text-center">Error Number</th><th scope="col" class="col-xs-3 text-center">Error Reason</th><th scope="col" class="col-xs-3 text-center">Error Description</th><th scope="col" class="col-xs-3 text-center">Action To Be Taken</th></tr></thead><tbody><tr><td class="text-right">' + selectedErrorCode[0].ReferenceNumber + '</td><td>' + selectedErrorCode[0].Error_Reason + '</td><td>' + selectedErrorCode[0].Error_Detail_Description + '</td><td>' + selectedErrorCode[0].Action_to_be_taken + '</td></tr></tbody></table><br/>'));
    // console.log(i, resultCountries[i]);
    //}
    return result;
    }
});
0

There are 0 best solutions below