0

Here's the table:

<tr>
 <td id="test123" align="center" rowspan="6" style="padding-right:50px;padding-left:20px;">test123</td>
 <td rowspan="6">
 <td rowspan="6">
 <td rowspan="6">
 <td rowspan="4" style="display: none;">
 <td colspan="9">
</tr>
<tr> <---- HIDE THIS ROW

I know how to select the id=test123 and how to hide rows using .parent and jQuery, but how do you hide something below the selector you're using?

1
  • $("#test123").parent().next() Commented Mar 28, 2013 at 17:21

3 Answers 3

2

Use .next() method.

$("tr:has('#test123')").next().hide();
Sign up to request clarification or add additional context in comments.

Comments

0

You can do it like this:

$('#test123').parent('tr').next().hide();

Comments

0

Try this:

$('#test123').closest('tr').next().hide();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.