I have javascript that modifies some HTML with a function like this:
if (correct == "true") { $('#ft2').html('Correct'); $('#ft2').css('color', 'Green') $('#ft2').css('border-color', 'Green') } else { $('#ft2').html('Incorrect'); $('#ft2').css('color', 'Red') $('#ft2').css('border-color', 'Red') }
The text changes very quickly on the page, and I would like it to look better for my users. Is there a way I can use jQuery to fade in color? For example, a new color appears within one second.
source share