I am having trouble applying the morph effect of mootools to more than one div. i want that all div 开发者_开发技巧morphs at the same time, but instead just the first one morphs. Please help!Thank you if you are taking your time to look at this! i have got the code from that page: http://davidwalsh.name/morphing-elements-mootools-css but i have two divs instead of one, that are exactly the same ( class, id etc are the same)! cheers Timm
you need Fx.Elements from mootools-more:
http://mootools.net/docs/more/Fx/Fx.Elements
which is better due to the unified timer etc.
the david walsh example is set for multiple elements also so not sure what you are doing wrong. in any case, its much easier to do:
$$("div.foo").morph({ width: 300, opacity: [0,1], background: "#ffffff"});
which will morph all these properties on all divs with a class of foo.
精彩评论