用jQuery闪烁一个div
问题描述:
我如何使div闪烁.我将鼠标悬停在div元素上.我该如何使用jQuery. div是向上闪烁还是向下闪烁.然后十秒钟.
How can i blink a div. I have a hover on the div element. How can i make with jQuery. That the div is blink up and blink down. And then on the 10 seconds.
谢谢
答
您正在寻找类似这样的东西吗?此代码将使div每隔10秒出现和消失:
Is something like this what you are looking for? This code will make the div appear and disappear every 10 seconds:
<script type="text/javascript">
var blink = function(){
$('#blinker').toggle();
};
$(document).ready(function() {
setInterval(blink, 10000);
});
</script>
<div id="blinker">This will blink</div>