Loading ...
Sorry, an error occurred while loading the content.
 

unanimate?

Expand Messages
  • jamesalanschulz
    Can anyone show me how to return an animated div to its original size. For instance, if I have this in my : function doIt() { var myAnim = new
    Message 1 of 2 , Oct 3, 2006
      Can anyone show me how to return an "animated" div to its original size.

      For instance, if I have this in my <script>:

      function doIt() {
      var myAnim = new YAHOO.util.Anim("test", {
      height: { to: 400 },
      width: { to: 400 }
      }, 1, YAHOO.util.Easing.easeOut);
      myAnim.animate();
      };

      and this is my HTML:

      <div id="test" onclick="doIt();">This is a test.</div>

      What do I need to add so that a second click on the "animated" div
      returns it to its original size?

      Thanks,

      JAS
    • dav.glass@yahoo.com
      Here is an example I wrote a little while back, hope it helps: http://blog.davglass.com/files/yui/animagain/ Dav Glass dav.glass@yahoo.com davglass.com
      Message 2 of 2 , Oct 3, 2006
        Here is an example I wrote a little while back, hope it helps:

        http://blog.davglass.com/files/yui/animagain/
         
        Dav Glass
        dav.glass@...
        davglass.com
        618.694.3476

        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +


        ----- Original Message ----
        From: jamesalanschulz <jaschulz@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, October 3, 2006 9:09:30 AM
        Subject: [ydn-javascript] unanimate?

        Can anyone show me how to return an "animated" div to its original size.

        For instance, if I have this in my <script>:

        function doIt() {
        var myAnim = new YAHOO.util.Anim( "test", {
        height: { to: 400 },
        width: { to: 400 }
        }, 1, YAHOO.util.Easing. easeOut);
        myAnim.animate( );
        };

        and this is my HTML:

        <div id="test" onclick="doIt( );">This is a test.</div>

        What do I need to add so that a second click on the "animated" div
        returns it to its original size?

        Thanks,

        JAS


      Your message has been successfully submitted and would be delivered to recipients shortly.