I am working on a JQuery, which hides & shows a particular element whenever user checks a box. I want to do a color flash on the element which is changed from hidden to visible, so that user knows where it is.
I tried doing this
jQuery("#login-form").show()
.css({backgroundColor: "red"})
.delay(2000)
.queue(function() {
jQuery("#login-form").css({backgroundColor: "#FFFFFF"});
});
but it works for the first time only, after then it just stops. Any ideas?
You might check out the ui/effect pulsate: http://docs.jquery.com/UI/Effects/Pulsate
$(#login-form).effect("pulsate", { times:3 }, 2000);
This does require you to download the ui lib configured to include pulsate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With