最新国产好看的视频,伊人天堂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)論

陵川县| 临安市| 河池市| 长宁区| 大兴区| 武陟县| 左权县| 汤阴县| 新昌县| 青川县| 靖边县| 南澳县| 南康市| 遵义市| 南阳市| 珲春市| 长丰县| 涿州市| 万源市| 噶尔县| 政和县| 阜新市| 龙井市| 崇左市| 乌兰浩特市| 吉水县| 辽中县| 娄烦县| 昭苏县| 浑源县| 灵山县| 松桃| 威海市| 舒城县| 邯郸市| 于都县| 甘泉县| 湛江市| 咸阳市| 应城市| 邯郸县|