I managed to hack my own, although I'll probably have to go test it on
every browser now.

new Effect.Morph(next,{style:getStyle('.med'),duration:.2})

function getStyle(className) {
        var classes = document.styleSheets[0].rules || document.styleSheets
[0].cssRules
        for(var x=0;x<classes.length;x++) {
                if(classes[x].selectorText==className) {
                        return (classes[x].cssText || 
classes[x].style.cssText).toLowerCase
().replace('\n','')
                }
        }
}


On Nov 27, 3:00 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> Maybe, if one were to create an object off screen, run addClass to add
> the style, then use getStyle to read it back, and then apply that as
> the argument to Morph. Seems like a lot of work, but since Morph uses
> getStyle and setStyle internally, that's what will have to happen (I
> think).
>
> Walter
>
> On Nov 27, 2008, at 12:50 PM, Diodeus wrote:
>
>
>
> > Is it possible to specify a CSS class name instead of a style for
> > Effect.Morph?
>
> > This doesn't work, I wish it would:
>
> > new Effect.Morph('test',{className:'med',duration:.2})
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to