javascript - Hide parentNode based on grandChild innerHTML -
i need hide entire row based on childnodes innerhtml. in form have status dropdown menu hiding on it's own doesn't ride of row. how set display of none?
using like:
$("nobr").filter(function () { return $.trim(this.childnodes[0].nodevalue) === "status"; }).closest("tr").hide();
this finds all <nobr>
elements on page, gets first child node (which in example, text node whitespace , text "status"), , checks text "status".
this need updated if order of elements in <nobr>
isn't example shows, or differs across rows, or else, because specific search.
of course, can narrow <nobr>
elements targeted @ first. example, if html wanted target within table, first find table , @ <nobr>
elements within:
$("#table_id").find("nobr").filter(func...
Comments
Post a Comment