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

鼠標(biāo)劃過(guò)實(shí)現(xiàn)延遲加載并隱藏層的js代碼

 更新時(shí)間:2013年10月11日 16:51:32   作者:  
鼠標(biāo)劃過(guò)延遲加載隱藏層的效果,想必大家都有見(jiàn)到過(guò)吧,在本文將為大家詳細(xì)介紹下使用js是如何實(shí)現(xiàn)的,感興趣的朋友可以參考下
復(fù)制代碼 代碼如下:

<div id="follow">
<a href="#" onmouseover="showPlusMobile();" onmouseout="hidePlusMobile();" class="btn">+Follow</a>
<div class="layer_follow" id="layer_follow" onmouseover="showPlusMobile();" onmouseout="hidePlusMobile();">
<p>這是隱藏層</p>
</div>
</div>

css:
復(fù)制代碼 代碼如下:

.layer_follow
{
display:none
}

js:
復(fù)制代碼 代碼如下:

var isPlusMobileVisible=false;
var showTid;
var hideTid;
function showPlusMobile(){
if(isPlusMobileVisible == false) {
showTid = setTimeout("document.getElementById('layer_follow').style.display='block'; isPlusMobileVisible=true;", 500);
}else{
clearTimeout(hideTid);
}
}
function hidePlusMobile(){
if(isPlusMobileVisible == true) {
hideTid = setTimeout("document.getElementById('layer_follow').style.display='none'; isPlusMobileVisible=false;", 500);
}else {
clearTimeout(showTid);
}
}

相關(guān)文章

最新評(píng)論

沙河市| 荆门市| 铁岭县| 克拉玛依市| 利辛县| 周口市| 洞头县| 金沙县| 睢宁县| 长阳| 行唐县| 太谷县| 公主岭市| 土默特右旗| 芜湖市| 岳普湖县| 延川县| 八宿县| 虞城县| 宁南县| 芜湖县| 广州市| 阿拉善右旗| 江源县| 资中县| 扎赉特旗| 油尖旺区| 田林县| 临夏市| 菏泽市| 沙湾县| 德安县| 乌恰县| 北海市| 榆林市| 康定县| 三门县| 双流县| 云龙县| 连山| 衡阳市|