Forum: Rails Spinoffs (closed, excessive spam) Effect.Shake's afterFinish not supported?

Posted by Patrick (Guest)
on 2008-07-01 21:18
(Received via mailing list)
I was under the impression that all Effects supported the afterFinish
callback, but I cannot get it to work on Effect.Shake. Here is a
simple example:

<html>
<head>
<title>Shake Test</title>
<script src="prototype.js" type="text/javascript" charset="utf-8"></
script>
<script src="scriptaculous.js" type="text/javascript"
charset="utf-8"></script>
</head>
<body>

<div id="test" style="padding: 20px; font-family: sans-serif; margin:
100px auto; background-color: red; color: white; width: 100px; height:
100px;">
Hello world.
</div>

<script type="text/javascript">

Event.observe(window, "load", function()
{
  Effect.Shake("test", { afterFinish: function()
  {
    alert("hi");
  } });
});

</script>


</body>
</html>
Posted by Patrick (Guest)
on 2008-07-02 00:04
(Received via mailing list)
Here is the live example:

http://krunk.ca/Effect.Shake/
This topic is locked and can not be replied to.