$('#txtSearchTemplateName').on('keyup', function () { if ($('#txtSearchTemplateName').val().length > 2) { $("tr[data-filter]").hide(); $("tr[data-filter*='" + $('#txtSearchTemplateName').val().toLowerCase() + "']").show(); } else // If less than two characters, show all lines $("tr[data-filter]").show(); var vDiv = document.getElementById("myDIV"); for (i = 0; i <= vDiv.childElementCount - 1; i++) { if (vDiv.children[i].tagName === "TABLE") { var vTbl = vDiv.children[i]; for (j = 0; j <= vTbl.childElementCount - 1; j++) { if (vTbl.children[j].tagName === "TBODY") { var vBody = vTbl.children[j]; var vTRList = vBody.getElementsByTagName("TR"); for (k = 0; k <= vTRList.length - 1; k++) { var element = vTRList[k]; var style = element.style; style.backgroundColor = "#ff0000"; element.style = style; } } } } } });
#ff0000 !important
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)