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

YAHOO Animate within DIV

Expand Messages
  • Michael Price
    Hi all, Is there any way to get YAHOO.util.Motion s points to be relative to the position of a DIV instead of page co-ordinates? Example: I have four elements
    Message 1 of 2 , Jul 30, 2006
    • 0 Attachment
      Hi all,
      Is there any way to get YAHOO.util.Motion's points to be relative to the
      position of a DIV instead of page co-ordinates?

      Example: I have four elements inside a DIV - I want to animate those
      elements within that DIV - what's the best way to do this?

      Regards,
      Michael Price
    • Matt Sweeney
      Hi Michael, If the animated elements will be absolutely positioned, one way would be to set the container s position to relative, then animate the top and
      Message 2 of 2 , Jul 31, 2006
      • 0 Attachment
        Hi Michael,

        If the animated elements will be absolutely positioned, one way would be
        to set the container's position to relative, then animate the "top" and
        "left" values of the element.

        If you need specific functionality from Motion, you could get the region
        of the container (YAHOO.util.Dom.getRegion), and calculate the motion
        points relative to that.

        Matt

        Michael Price wrote:

        >Hi all,
        >Is there any way to get YAHOO.util.Motion's points to be relative to the
        >position of a DIV instead of page co-ordinates?
        >
        >Example: I have four elements inside a DIV - I want to animate those
        >elements within that DIV - what's the best way to do this?
        >
        >Regards,
        >Michael Price
        >
        >
        >
        >Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.