<script>
$(function(){
    $("div[@class$=curr]").each(function(i){
        
        $(this).click(function(){
            alert(i);
            $(" table:nth-child("+(i+1)+")").css('display','block').siblings().each(function(){$(this).css("display","none")});            
        })
    })
})

</script>
讲解:红色部分首先是取得多个table里的某一个table,然后给这个table加了显示样式,接着对所有的兄弟节点添加隐藏样式
应用:如图

css如下:
.curr
{
    
float:left; width:17px; height:42px; background:url(images/fw_swith_curr.gif); /* width:30px height:50px */
    layout
-flow: vertical-ideographic;letter-spacing:5px; color:#4a6d84;
    font: bold 14px simsun; padding:8px 13px 
0 0;
}


.no_curr
{
    
float:left; width:17px; height:42px; background:url(images/fw_swith.gif); /* width:30px height:50px */
    layout
-flow: vertical-ideographic;letter-spacing:5px; color:#4a6d84;
    font: bold 14px simsun; padding:8px 13px 
0 0;
}
html如下:(就是有两个table)
<div id="fw_header_switch">
        
<div class="curr">技术</div>
        
<div class="no_curr">产品</div>
    
</div>
    
<div id="fw_header_menu">
        
<table cellspacing="0" cellpadding="0" border="0" align="center" width="99%">
        
<tr>
        {{section name=i loop=$lica[3].link}}
            
<td>
                
<img src="/_framework/front/images/fw_header_arr.gif" align="absmiddle">
                
<href="{{$lica[3].link[i].link_url}}">{{$lica[3].link[i].link_txt}}</a>
            
</td>
            {{if ($smarty.section.i.index+1)%7 == 0 && !($smarty.section.i.last)}}
        
</tr><tr>
            {{elseif $smarty.section.i.last}}
        
</tr>
            {{/if}}
        {{/section}}    
        
</table>
        
<table cellspacing="0" cellpadding="0" border="0" align="center" width="99%">
        
<tr>
        {{section name=i loop=$lica[4].link}}
            
<td>
                
<img src="/_framework/front/images/fw_header_arr.gif" align="absmiddle">
                
<href="{{$lica[4].link[i].link_url}}">{{$lica[4].link[i].link_txt}}</a>
            
</td>
            {{if ($smarty.section.i.index+1)%7 == 0 && !($smarty.section.i.last)}}
        
</tr><tr>
            {{elseif $smarty.section.i.last}}
        
</tr>
            {{/if}}
        {{/section}}    
        
</table>
    
</div>

js:如下
<script>

$(
function(){//实现隐藏显示
    $("div[@class$=curr]").each(function(i){        
        $(
this).mouseover(function(){
            $(
this).removeClass().addClass("curr");
            $(
this).siblings().each(function(){$(this).removeClass().addClass("no_curr")});
            $(
"#fw_header_menu table:nth-child("+(i+1)+")").show().siblings().each(function(){$(this).hide()});            
        }
)
    }
)
}
)

</script>