Blink an div with jquery

后端 未结 1 1214
清酒与你
清酒与你 2021-01-17 04:05

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条回答
  • 2021-01-17 04:28

    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>
    
    0 讨论(0)
提交回复
热议问题