Actually i'm trying to change a class with jquery to a bootstrap badge item. The item's are generated dynamically so on click of the table item i add to a variable the id of the anchor.
Then i've made 4 functions for each item of popover that you can see on the screen

Each of the popover anchors as CHIUSO RISOLTO etc. should change the main anchor class of the table item.
Actually i was trying to use something like this to change the class
function Risolt() {
$("#idticket").removeClass();
$('#idticket').addClass('badge badge-success');
}
I think the problem is on setting the id as onClick of table items i've set the following function
var idticket
function setId(id) {
idticket = id
}
removeClass()