>
> Can anyone suggest a simple way to dynamically remove a classname's effect
> from an element, basically removing the style that was added over time in
> "reverse"?
>
>
> I'd try to remember original style before new classname was applied and
morph to this style:
// remember
var foo = $('foo'), originalStyle = foo.getStyles();
// apply CSS class
foo.morph('here');
// ... skipped
// morph to original style
foo.morph(originalStyle, {
afterFinish: function(effect) {
// remove class name after finish
effect.element.removeClassName('here');
}
});
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/prototype-scriptaculous/-/1niu20woD2EJ.
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.