ECSHOP首页弹出分类菜单

<script language="javascript">
function omshow(id,str)
{
var obj=document.getElementById('omshow'+id);
obj.style.display=str;
}
</script>

 

 

<ul class="menu j_Menu" style="height:605px;">
{foreach name=c from=$categories item=cat}
<li class="item item{$smarty.foreach.c.index}" style="position:relative" onmouseover="omshow({$smarty.foreach.c.index},'block')" onmouseout="omshow({$smarty.foreach.c.index},'none')">
<h3 class="item-hd item-hd0" ><s></s><a href="{$cat.url}">{$cat.name}</a></h3>
{if $cat.cat_id}
<div style=" border:1px solid #ccc; z-index:99999; background:#FFF; position:absolute; top:0px; right:-200px; width:200px; display:none" id="omshow{$smarty.foreach.c.index}">
<!--{foreach from=$cat.cat_id item=child}-->
<a href="{$child.url}" style="display:block; padding-left:20px; padding-right:10px; float:left; height:30px; line-height:30px;">{$child.name|escape:html}</a>
<!--{/foreach}-->
</div>
{/if}
</li>

{/foreach}
</ul>

效果图

posted @ 2013-05-31 18:52  随心^_^  阅读(462)  评论(0编辑  收藏  举报