PDA

View Full Version : JS Scriptaculous Effect.multiple



NeoDreamer
July 28th, 2008, 07:33 PM
http://levichi.com/storage/temp.html

I have a problem applying Effect.multiple. It always says something is undefined. If I apply multiple Shrinks, it says "element.style is undefined". If I apply multiple Fades, it says "getInlineOpacity is undefined". And so on...

As you can see, normal combination effects work on my site. Just click the second link to see.



<a href="#" onclick="new Effect.multiple('temp', Effect.Shrink, { speed: 1 });">Apply Effect.multiple</a>
<br />
<a href="#" onclick="new Effect.Fade('temp');">Apply Effect.Fade</a>

<div id="temp">
<div id="1">1</div>
<div id="2">2</div>
<div id="3">3</div>
</div>

NeoDreamer
July 28th, 2008, 09:11 PM
Nevermind.

I think Scriptaculous's documetation is wrong. They said that the 1st argument should be the DIV name. However, their sample code shows that the argument should be this:



listItems = $('temp').select('div');


It's notation I have never seen before, but it makes it work.......