The following HTML is inside a loop, so it can be repeated many times over.
<table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table class="a"><tr><td></td></tr></table></td> <td rowspan='2'> </td> </tr> <tr> <td><table class="b"><tr><td></td></tr></table></td> </tr> </table> I have a click function on table.a All table.b are given hide() How do I show() only the table.b that directly follows the table.a that has been clicked? I have been trying something like: $("table.a").click(function(){ $(this). >From here I dont know whether to do parent() or next() or how to move across the tr and td to table.b