Hi bminihan, On Feb 9, 3:59 pm, bminihan <[email protected]> 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 would take about the same time that changing 300 times the opacity (even more since you have to remove the previous one). Moreover, I am looking for "smooth" transition. I don't think there is an effect that allow iterating a collection of classNames and setting it to the objects one after another (but this could give some interesting effects :o) ). The interest here is to change a single variable and impact hundreds (thousands?) of DOM objects in an eye blink. Eric NB: BTW, since classNames is a collection, you may not affect it this way but instead use Element.addClassName() and Element.removeClassName (). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
