最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

鼠標(biāo)懸浮顯示二級(jí)菜單效果的jquery實(shí)現(xiàn)

 更新時(shí)間:2014年10月29日 16:17:23   投稿:whsnow  
當(dāng)鼠標(biāo)懸浮時(shí)顯示二級(jí)菜單,這種類似的效果,想必大家在瀏覽網(wǎng)頁(yè)時(shí)經(jīng)常會(huì)遇到吧,下面有個(gè)示例,大家可以看看

1.布局:

<div class="show"> 
<img src="~/images/head_icon.png" /> 

<div class="drop" style=" display:none; z-index:80000" id="profileMenu"> 
<ul> 
<li> 
<a class="pass" style="cursor: pointer" 
href='#'> 
<span>修改密碼</span> 
</a> 
</li> 
<li> 
<a class="quit" style="cursor: pointer" 
href='#' 
><span>退出</span></a> 
</li> 
</ul> 
</div> 
</div>

2.js控制:

function dropMenu(obj) { 
$(obj).each(function () { 
var theSpan = $(this); 
var theMenu = theSpan.find(".drop"); 
var tarHeight = theMenu.height(); 
theMenu.css({ height: 0, opacity: 0 }); 


var t1; 


function expand() { 
clearTimeout(t1); 
//theSpan.find('a').addClass("selected"); 
theMenu.stop().show().animate({ height: tarHeight, opacity: 1 }, 200); 
} 


function collapse() { 
clearTimeout(t1); 
t1 = setTimeout(function () { 
// theSpan.find('a').removeClass("selected"); 
theMenu.stop().animate({ height: 0, opacity: 0 }, 200, function () { 
$(this).css({ display: "none" }); 
}); 
}, 250); 
} 


theSpan.hover(expand, collapse); 
theMenu.hover(expand, collapse); 
}); 
} 

相關(guān)文章

最新評(píng)論

通许县| 水城县| 兰西县| 临泉县| 石狮市| 阜平县| 长寿区| 绥江县| 阳高县| 德州市| 隆回县| 浠水县| 沅江市| 四川省| 盐亭县| 平塘县| 云浮市| 峨眉山市| 绥滨县| 汝南县| 夏邑县| 永泰县| 巴彦县| 黑河市| 黔西县| 浦城县| 中阳县| 永仁县| 九江县| 托里县| 枞阳县| 昂仁县| 鲁山县| 敦煌市| 揭西县| 贵溪市| 河池市| 吴桥县| 咸丰县| 宾阳县| 台江县|