I have 3 actions buttons
I've followed this documentation https://getbootstrap.com/docs/4.3/components/collapse/
This is my (i) button
<a data-device-mac="BCAEC5DA2D87" class="stats-modify-btn" title="Device Info" data-toggle="collapse" href="#info-BCAEC5DA2D87" role="button" aria-expanded="false" aria-controls="info-BCAEC5DA2D87">
<i class="fa fa-info ml15"></i>
</a>
Then, I also have this
$('.stats-modify-btn').click(function() {
console.log($(this).attr("data-device-mac"));
var deviceMac = $(this).attr("data-device-mac");
var title = $(this).attr("title");
var infoAccordion = `
<div class="collapse row stats-device-table detail-slider" id="info-${device.device_mac}">
<div class="col-sm-6" id="device_status_value">
${device.display_activity}
</div>
</div>
`;
if(title == "Device Info"){
console.log('show Device Info');
$('#tr-'+ deviceMac).append(infoAccordion).show();
}
});
I have no idea why the accordion is not triggering.
Is it try to triggering but the actual DOM is not yet there? How do I make sure ?
