tags:

views:

74

answers:

1

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.

Thanks

+1  A: 

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>
dvcolgan
That'll make the `div` appear and disappear every **0.1** seconds, (`100` milliseconds). But otherwise, +1 =)
David Thomas
Oh, good catch. I changed it to 100 when I was testing it. :) Now it will go for 10 seconds.
dvcolgan