jQuery “blinking highlight” effect on div?

后端 未结 15 1127
囚心锁ツ
囚心锁ツ 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:11

    I use different predefined colors like so:

    theme = {
        whateverFlashColor: '#ffffaa',
        whateverElseFlashColor: '#bbffaa',
        whateverElseThenFlashColor: '#ffffff',
    };
    

    and use them like this

    $('#element').effect("highlight", {color:theme.whateverFlashColor}, 1000);
    

    easy :)

提交回复
热议问题