JqueryUI: Effects – Color Animation

jQuery UI effects core adds the ability to animate color properties using rgb(), rgba(), hex values, or even color names such as "aqua". Simply include the jQuery UI effects core file and .animate() will gain support for colors.

The following properties are supported:

  • backgroundColor
  • borderBottomColor
  • borderLeftColor
  • borderRightColor
  • borderTopColor
  • color
  • columnRuleColor
  • outlineColor
  • textDecorationColor
  • textEmphasisColor

Syntax

$( "#example" ).animate(
   { 
      color: "white"
      backgroundColor: "black",
   }
);

Leave a Reply

Your email address will not be published. Required fields are marked *