二级菜单悬停

来源:互联网 发布:qq飞车终极迈凯轮数据 编辑:程序博客网 时间:2024/04/30 05:56
  <div id="qq"></div>

  <div id="title"></div>


<style>
#qq { width:200px; height:400px; background:#F9C; }
#title { width:240px; height:180px; background:#FC6; position:absolute; top:10px; left:220px; display:none; }
</style>
<script src="miaov.js"></script>
<script>
$(function(){
var qq = $('qq');
var title = $('title');
var timer = null;

qq.onmouseover = show;
qq.onmouseout = hide;

title.onmouseover = show;
title.onmouseout = hide;

function show(){
clearInterval( timer );
title.style.display = 'block';
}
function hide(){
timer = setTimeout(function(){
title.style.display = 'none';
}, 200);
}
});
</script>

0 0