In IE11 the below code shows the following error, But it is working in Chrome
Object doesn't support property or method 'closest'4:31 PM 09/07/16
assetTable.on("click", "td.clickProgress", function onDataTableRowClicked(event) {
var tr = this.closest("tr");
var assetId = tr.id.replace("asset_", "");
LoadDialog(assetId);
}
However, when I change it to $(this)
it is working in both IE and Chrome
assetTable.on("click", "td.clickProgress", function onDataTableRowClicked(event) {
var tr = $(this).closest("tr");
var assetId = tr.attr('id').replace("asset_", "");
LoadDialog(assetId);
}
Any reason behind this compatibility issue between browsers?