I would like to know how I can access a part of my table, the part where I put the label-success I assign an id to td to do something but it does not work as I put the span and the same. I do not know what I'm doing wrong
use this function did not work for me
$( '#idse' ).dblclick(function() {
alert( "s" );
});
$( '#idven' ).dblclick(function() {
alert( "v" );
});
$( '#idge' ).dblclick(function() {
alert( "g" );
});
code
for(var i=0; i<resp.length; i++)
{
var diffTime = moment(fecha).diff(resp[i].fecha_registro);
var dias = diffTime/86400000;
console.log(dias);
var labelType = (resp[i].res == 'aprob') ? 'label-success' : 'label-warning';
var labelType1 = (resp[i].se == 'aprob') ? 'label-success' : 'label-warning';
var labelType2 = (resp[i].ven == 'aprob') ? 'label-success' : 'label-warning';
var labelType3 = (resp[i].ge == 'aprob') ? 'label-success' : 'label-warning';
var boton = (resp[i].as== '') ? '<div data-id="'+resp[i].id+'" data-nombre= "'+resp[i].nom+'" class="btn btn-primary registrar_o">Asignar</div>' : resp[i].as;
html+= '<tr><td data-id="'+resp[i].id+'">'+resp[i].fecha_registro+
'</td><td class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType + '">'+resp[i].res+
'</span></td><td id="idse" class="center" data-id="'+resp[i].id+'"><span class= "label ' + labelType1 +'">'+resp[i].se+
'</span></td><td id="idven" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType2 +'">'+resp[i].ven+
'</span></td><td id="idge" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType3 +'">'+resp[i].ge+
'</span></td></tr>';
}
$('#body').html(html);