Bear with me, I'm clueless on javascript.
function onTableClick(e) {
if (e.target.closest('td').innerHTML == "Edit") {
let myElement = document.querySelector("#JamHeadTable");
myElement.style.opacity = 1;
var id = e.target.closest('tr').id.split("_")[1];
editTableRow(id);
}
}
I've got this function that has worked fine in Chrome and Edge but I just tried debugging my ASP.Net site in Visual Studio on Internet Explorer 11 and it breaks on the first line:
if (e.target.closest('td').innerHTML == "Edit")
Is there an equivalent I can use other than e.target.closest('td')
to make it IE11 compatible? Baring in mind I also use e.target.closest('tr')
a couple of lines down.