jQuery "blinking highlight" effect on div?
jQuery UI Highlight Effect is what you're looking for.
$("div").click(function () { $(this).effect("highlight", {}, 3000);});
The documentation and demo can be found here
Edit:
Maybe the jQuery UI Pulsate Effect is more appropriate, see here
Edit #2:
To adjust the opacity you could do this:
$("div").click(function() { // do fading 3 times for(i=0;i<3;i++) { $(this).fadeTo('slow', 0.5).fadeTo('slow', 1.0); }});
...so it won't go any lower than 50% opacity.
Take a look at http://jqueryui.com/demos/effect/. It has an effect named pulsate that will do exactly what you want.
$("#trigger").change(function() {$("#div_you_want_to_blink").effect("pulsate");});
This is a custom blink effect I created, which uses setInterval
and fadeTo
HTML -
<div id="box">Box</div>
JS -
setInterval(function(){blink()}, 1000); function blink() { $("#box").fadeTo(100, 0.1).fadeTo(200, 1.0); }
As simple as it gets.