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

can't make 2 animations on same obj at once?

Expand Messages
  • Patrick Sullivan
    I am trying to increase opacity and fontsize at the same time. Either one works by itself (opacity or fontSize) but I cannot get both to work simultaneously.
    Message 1 of 3 , May 31 7:16 PM
    • 0 Attachment
      I am trying to increase opacity and fontsize at the same time. Either one works by itself (opacity or fontSize) but I cannot get both to work simultaneously. This seems kind of strange, because we eventually did get a div to animate 3 attributes at once (width, height, opacity) a few days ago.

      var myanim = new YAHOO.util.Anim('sample', {fontSize: {from: 0, to: 40}}, {opacity: {from: 0, to: 1}});

      Patrick Sullivan, AA-BA, BA-IT
    • Simon Willison
      ... This should work: var myanim = new YAHOO.util.Anim( sample , { fontSize: {from: 0, to: 40}, opacity: {from: 0, to: 1} }); Cheers, Simon
      Message 2 of 3 , Jun 1, 2006
      • 0 Attachment
        On 1 Jun 2006, at 03:16, Patrick Sullivan wrote:

        > I am trying to increase opacity and fontsize at the same time.
        > Either one works by itself (opacity or fontSize) but I cannot get
        > both to work simultaneously. This seems kind of strange, because we
        > eventually did get a div to animate 3 attributes at once (width,
        > height, opacity) a few days ago.
        >
        > var myanim = new YAHOO.util.Anim('sample', {fontSize: {from: 0, to:
        > 40}}, {opacity: {from: 0, to: 1}});

        This should work:

        var myanim = new YAHOO.util.Anim('sample', {
        fontSize: {from: 0, to: 40},
        opacity: {from: 0, to: 1}
        });

        Cheers,

        Simon
      • Patrick Sullivan
        Wow, that works! So I just had too many curly braces, huh? Well, the code looks better without all those, too. Thank you, Simon. I feel dumb. Patrick Sullivan,
        Message 3 of 3 , Jun 1, 2006
        • 0 Attachment
          Wow, that works! So I just had too many curly braces, huh? Well, the code looks better without all those, too. Thank you, Simon.

          I feel dumb.

          Patrick Sullivan, AA-BA, BA-IT
        Your message has been successfully submitted and would be delivered to recipients shortly.