Results 1 to 3 of 3

Thread: Help with Switch Content Script

  1. #1
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Switch Content Script

    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


    Code:
    	<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>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try this:

    Code:
    	<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>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •