1 var t;
2 function showportal() {
3 if ($(
"#图片ID").
is(
":hidden"))
4 $(
"#图片ID").show();
5 else
6 $(
"#portal").hide();
7 t = setTimeout(
'showportal()',
300);
8 }
9
10 闪动
:
11 showportal() ;12 停止闪动:
13 clearTimeout(t);14 鼠标移动到图片图片停止闪动 移开继续闪动
15 $(
"#图片ID").bind(
"mouseover", function () { clearTimeout(t); });
16 $(
"#图片ID").bind(
"mouseout", function () { showportal(); })17 移出鼠标事件
18 $(
"#图片ID").unbind(
"mouseover");
19 $(
"#图片ID").unbind(
"mouseout");
转载于:https://www.cnblogs.com/ybyi/p/3781732.html
相关资源:JavaScript网页特效范例宝典源码