Necesito esconder unas filas y mostrarlas al hacer click con la figura del mas y menos si alguien tiene otro codigo bienvenido sea
Código:
<html> <head> <script langauge="javascript"> <!-- function show(rowID) { if (eval('tr'+rowID+'.className')=="hide") { eval('tr'+rowID+'.className="show"') eval('img'+rowID+'.src="images/minus.gif"'); } else { eval('tr'+rowID+'.className="hide"') eval('img'+rowID+'.src="images/plus.gif"'); } } //--> </script> <style> <!-- .hide { visibility: hidden; display: none } .show { visibility: visible; display: block } //--> </style> </head> <body> <table border=1 cellspacing=1 cellpadding=5> <tr> <td><a style="cursor:hand" onclick="show('1')"><img name="img1" border="0" src="images/plus.gif" width="10" height="10"> Topic 1</a></td> </tr> <tr id="tr1" class="hide"> <td>Information for Topic 1 here</td> </tr> <tr id="tr4" class="hide"> <td>456454565</td> </tr> <tr> <td><a style="cursor:hand" onclick="show('2')"><img name="img2" border="0" src="images/plus.gif" width="10" height="10"> Topic 2</a></td> </tr> <tr id="tr2" class="hide"> <td>Information for Topic 2 here</td> </tr> <tr> <td><a style="cursor:hand" onclick="show('3')"><img name="img3" border="0" src="images/plus.gif" width="10" height="10"> Topic 3</a></td> </tr> <tr id="tr3" class="hide"> <td>Information for Topic 3 here</td> </tr> </table> </body> </html>