jQuery “blinking highlight” effect on div?

后端 未结 15 1126
囚心锁ツ
囚心锁ツ 2020-12-04 09:24

I\'m looking for a way to do the following.

I add a

to a page, and an ajax callback returns some value. The
is fill
15条回答
  •  执念已碎
    2020-12-04 10:19

    This is a custom blink effect I created, which uses setInterval and fadeTo

    HTML -

    Box

    JS -

    setInterval(function(){blink()}, 1000);
    
    
        function blink() {
            $("#box").fadeTo(100, 0.1).fadeTo(200, 1.0);
        }
    

    As simple as it gets.

    http://jsfiddle.net/Ajey/25Wfn/

提交回复
热议问题