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>
on 2008-07-01 21:18