hi, i''ve just started using script.aculo.us visual effects, lots of fun. i was wondering what the best and most efficient way would be of achieving something along the lines of fade anything technique (FAT, http://www.axentric.com/aside/fat/) whereby an element''s background fades away from one color to the element''s native background-color. (for example, you get a paragraph or a div highlighted on page load, but then the highlight fades away over a certain number of seconds...) script.aculo.us obviously has the fade effect -- but i don''t see how it could be applied to the element''s background-color only. or can it? any hints would be greatly appreciated. all best, tench
Isn''t this already in the current codebase? I haven''t tried to do what you''re doing, but this came to mind.>From the latest CHANGELOG...* Greatly expanded Effect.Highlight to have user-defined colors and autodetecting the background color On 7/12/05, Tench <tench@mac.com> wrote:> hi, > > i''ve just started using script.aculo.us visual effects, lots of fun. > > i was wondering what the best and most efficient way would be of > achieving something along the lines of fade anything technique (FAT, > http://www.axentric.com/aside/fat/) whereby an element''s background > fades away from one color to the element''s native background-color. > > (for example, you get a paragraph or a div highlighted on page load, > but then the highlight fades away over a certain number of seconds...) > > script.aculo.us obviously has the fade effect -- but i don''t see how > it could be applied to the element''s background-color only. or can > it? any hints would be greatly appreciated. > > all best, > tench > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On 13/07/2005, at 3:04 AM, Tench wrote:> i was wondering what the best and most efficient way would be of > achieving something along the lines of fade anything technique (FAT, > http://www.axentric.com/aside/fat/) whereby an element''s background > fades away from one color to the element''s native background-color.Unfortunately the site''s missing docs for the Highlight effect. The options available (on top of your standard Effect options) are: startcolor (default "#ffff99") endcolor restorecolor endcolor is the color that the background will fade towards. If the endcolor param is not specified it will use the element''s background color (if it has one), else it will use "#ffffff". restorecolor is the background color to be set at the end of the effect. This defaults to the background color of the element (usually nothing - i.e. transparent) - tim lucas