I have an Image with the id of 'img1'.

When I click on it I want to fire a function called animate().


I'm trying to queue up some effects to get img1 to animate in the
following manner:

1- Squish in to the top left-corner (http://wiki.github.com/madrobby/
scriptaculous/effect-squish)

2- while img1 is "invisible" I want to change the image source

3- Then "Grow" it back from the top-left corner down. The "Squish"
Effect in reverse essentially.



Here's what I was able to come up with so far:


    <img id="img1" src="images/1" onclick="animate()"/>



    <script type="text/javascript" language="javascript">
      // <![CDATA[

      function animate()
      {
        new Effect.Squish('img1');
        new Effect.Grow('img1', {queue: 'end'});
      }

      // ]]>
    </script>

--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to