PDA

View Full Version : Help with Switch Content Script



jamief90
08-01-2005, 10:46 AM
Hi,
I'm trying to use the Switch Content Script in my menu to hide a number of table rows, the following samle of code works fine in IE but in firefox it opens the sub menu (bits inbetween the tbody tag) at the bottom of the menu rater than below the previous table row, as can be seen in this example http://www.whatspoon.com/menu.asp

Any help with a fix or a suggestion on how to hide/unhide multipal table rows would be most appreciated.

Many Thanks in advance.
Jamie



<tr>
<td bgcolor="#7F7F7F"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#" onClick="expandcontent('sc1')" >Superchargers & Turbos</a></td>
</tr>
<tbody id="sc1" class="switchcontent">
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Superchargers</a></td>
</tr>
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Turbos</a></td>
</tr>
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Options & Upgrades</a></td>
</tr>
</tbody>

jscheuer1
08-01-2005, 01:44 PM
Try this:


<tr>
<td bgcolor="#7F7F7F"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#" onClick="expandcontent('sc1')" >Superchargers & Turbos</a>
<table id="sc1" class="switchcontent">
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Superchargers</a></td>
</tr>
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Turbos</a></td>
</tr>
<tr>
<td bgcolor="#333333"><img height="10" src="images/site/arrow_gray.gif" width="13" border="0"><a class="menu_1" href="#">Options & Upgrades</a></td>
</tr>
</table></td>
</tr>

jamief90
08-01-2005, 09:07 PM
That does work, thanks for that. I'm a little concerned about using so many tables but i'm gonna give it a go anyway.

Cheers