I am new to jquery and am having a hard time figuring out this problem. I want to hide certain table rows containing form fields when a page loads and only show them when the rel value in a select option equals the rel value of the table row.
The first part is simple $(function(){ $("tr[rel]").hide(); }); The rest I'm not sure about. I tried this: $("select").change(function () { $(("tr[rel]").val() == ("select").val()).("tr[rel]").show(); }); but nothing happened when the select fields were changed. The other thing that I need to do is check the value of the select fields (there are two) when the page loads and make sure that any matching <tr> tags display.