[ADD] GENERAL: Method to toggle the highlight for the check box

This commit is contained in:
Horilla
2023-11-17 12:19:33 +05:30
parent 63425acd27
commit 0b7883cefb

View File

@@ -803,4 +803,12 @@ function highlightRow(checkbox) {
checkbox.closest(".oh-sticky-table__tr").addClass("highlight-selected")
}
}
function toggleHighlight(ids){
$.each(ids, function (indexInArray, id) {
$(`#${id}`).closest(".oh-sticky-table__tr").removeClass("highlight-selected")
if ($(`#${id}`).is(":checked")) {
$(`#${id}`).closest(".oh-sticky-table__tr").addClass("highlight-selected")
}
});
}
</script>