Friday, July 11th, 2008

YPulse: Fades and Pulsations Library

Category: Component, JavaScript, Library, Yahoo!

Kent Johnson has released YPulse a simple open source wrapper for the YUI Animation library that makes creating highlight fades and pulsing button glows a bit easier.

You pulse away with something like:

javascript

  1. var pulser = new YAHOO.squarebits.YPulse(
  2.   ‘my-div’,
  3.   ‘backgroundColor’,
  4.   ‘#FFFFFF’, // starting
  5.   ‘#FFFF00′, // ending
  6.   0.75, // The number of seconds for the start-end transition
  7.   0.10, // The number of seconds to wait after completing the start-end transition
  8.   0.75, // The number of seconds for the end-start transition
  9.   0.75, // The number of seconds to wait after completing the end-start transition
  10.   YAHOO.util.Easing.easeBoth, // The YAHOO easing method to use for the start-end transition
  11.   YAHOO.util.Easing.easeBoth // The YAHOO easing method to use for the end-start transition
  12. );

Posted by Dion Almaer at 8:42 am
1 Comment

++---
2.4 rating from 31 votes

1 Comment »

Comments feed TrackBack URI

Cool. But with so many arguments I would prefer YPulse accepting an object as a single parameter. Otherwise it looks like a lot of “magic” numbers to me.

Comment by aheckmann — July 11, 2008

Leave a comment

You must be logged in to post a comment.