Is there a way to animate text color using jQuery/jQuery UI? I want the text color to change from #000 to #F00 when an event is triggered, then fade back to #000 over 3 seconds.
I attempted using effect("highlight", {}, 3000)
with the highlight effect, but it doesn't re-trigger until completion and will continue for the same duration of time. This isn't ideal for my needs.
Any suggestions?
C
UPDATE:
This is my current attempt:
$("input:text[name=size_w]").keyup(function () {
var value = ($("input:text[name=size_w]").val() == "") ? "null" : $("input:text[name=size_w]").val();
$("#width_emb").text(value).css({ color: "red" }).animate({ color: "black" }, 3000);
}).keyup();
However, it still doesn't function as desired. I am unable to re-trigger the initial color change until the animation is complete. If the event is triggered again before 3 seconds, I need to cancel the animation and restart it.