Alex Rivera | Logout

How do you fade in/out a background color using jquery?

Asked 2009-06-09T01:51:46.117
106

How do I fade in text content with jQuery?

The point is to draw the user's attention to the message.

Edit
Report

1 Answer

16

Usually you can use the .animate() method to manipulate arbitrary CSS properties, but for background colors you need to use the color plugin. Once you include this plugin, you can use something like others have indicated $('div').animate({backgroundColor: '#f00'}) to change the color.

As others have written, some of this can be done using the jQuery UI library as well.

answered 2009-06-09T05:18:09.027

Your Answer