[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-11 Thread ColinFine
On Feb 9, 2:49 pm, Eric lefauv...@gmail.com wrote: Hi, I apologize if my question is stupid (and it should be since I cannot find any reference to this idea anywhere) but I was wandering if it would be possible to use an effect on a CSS style definition instead of a DOM object. The

[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-11 Thread david
Hi Eric, To be more precise regarding you answer in the second post, there is actually no way to modify a CSS property and do a transition on a large number of elements. But things are changing, and there is webkit pushing the limit on web animation (or transition). the answer given from

[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-11 Thread david
Hi Eric, After writting the last post, a light bright in my mind! Why could it be impossible?? Stupid The very big difficulties is to be able to select the good class to change it's value. But look at this small test. It will change opacity from 1 to 0 to all black elements when clicking

[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-10 Thread david
Hi Eric, you should know that Effect.Morph accept a class as style input. So let's try something like that: $$(.foo).each( function (item) { new Effect.Morph(item, { style: 'error', // CSS class name }); }); But talking about performance, I'm not sure it's the best way to do it ! --

[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-09 Thread bminihan
Why not just switch all of your elements to a different class, with the new effect? .FOO { opacity: 1.0 } .BAR { opacity: .9 } $$(.foo).each( function (item) { item.className = BAR; }) On Feb 9, 9:49 am, Eric lefauv...@gmail.com wrote: Hi, I apologize if my question is stupid (and it should

[Proto-Scripty] Re: Applying scriptaculous effects on CSS styles

2009-02-09 Thread Eric
Hi bminihan, On Feb 9, 3:59 pm, bminihan bjmini...@gmail.com wrote: Why not just switch all of your elements to a different class, with the new effect? .FOO { opacity: 1.0 } .BAR { opacity: .9 } $$(.foo).each( function (item) { item.className = BAR; }) Well, changing 300 times a class