Simeon Franklin

jQuery doesn't provide support for animating color properties but the jQuery color plugin adds this feature to the library. This is included automatically if you use the jQuery UI library but we can also use the color plugin independently.

Complete the following:

  1. Download the color plugin to your labs directory (https://raw.github.com/jquery/jquery-color/master/jquery.color.js) and include it in a new script tag in your chat.hml file.
  2. When new tweets are loaded from the server, animate them to change to a yellow background color (#FFFF00) slowly, pause for half a second and then quickly fade to white (#FFFFFF).
  3. Wrap this animation inside a plugin and call it colorfade. You should be able to alter main program to use your plugin like:
    
       $(newtweet).colorfade();
      
  4. Add option handling to your plugin so that you can specify a target and reset color like:
    
       $(newtweet).colorfade({'target': '#FF0000', 'reset': '#0000FF'});
      

See my solution...