You can change the code like this:
function highlightMatches(elm, fin) {
var sVal = jQuery(elm).val(),
container = jQuery("#vLookup_" + fin + "_" + spjs.dffs.data.thisItemID).find(".vLookupTable");
container.find("tr.vLookupTableRow").removeClass("highlightSearchMatchInvLookup").show();
if (sVal !== "") {
container.find("tr.vLookupTableRow").each(function(i, tr) {
if (jQuery(tr).text().match(sVal) !== null) {
jQuery(tr).addClass("highlightSearchMatchInvLookup");
}else{
jQuery(tr).hide();
}
});
}
}
Alexander
Link to original forum post: https://spjsblog.com/forums/topic/vlookup-search/
-
This reply was modified 4 years, 3 months ago by Alexander Bautz. Reason: Added link to original post