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

Re: [ydn-javascript] still can't get transitions to work (was I have no idea)

Expand Messages
  • Patrick Sullivan
    THANKS Eric! Finally it basically just works, with.no errors. And thanks to everyone else who made suggestions, too. Now I am back to my original problem. How
    Message 1 of 10 , May 30 11:38 AM
    • 0 Attachment
      THANKS Eric! Finally it basically just works, with.no errors. And thanks to everyone else who made suggestions, too.

      Now I am back to my original problem. How can I make the text inside the div expand? I was hoping the YUI Library could help. All the js samples I have seen involve changing <font> tags on the fly. Is that the only way?

      I have thought of turning the text into images that are easy to maniplulate, but that would involve an extra step if I ever wanna change it again. Or maybe, something like

      for (i=0:1<100;i++) {
      idt=getelementbyid(el)
      idt.text-size += 0.1; //where el is in ems
      }

      Patrick Sullivan, AA-BA, BA-IT

      ----- Original Message -----
      From: "Eric Miraglia" <miraglia@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Tuesday, May 30, 2006 10:16 AM
      Subject: Re: [ydn-javascript] still can't get transitions to work (was I have no idea)


      > Patrick,
      >
      > Nothing big here -- your myanim instantiation has a typo; the last
      > curly brace should be a closing paren.
      >
      > And making it animate on pageload is as simple as taking the
      > myanim.animate() line out of the animate function that is currently
      > deferred until click. If it runs in the init function, it will run
      > on pageload automatically.
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      > "http://www.w3.org/TR/html4/strict.dtd">
      > <head>
      > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      > <title>Untitled Document</title>
      > <?php include("labs/shared/yuil.php");?>
      > <style type="text/css">
      >
      > #sample{
      > opacity: 0;
      > width: 0;
      > height: 0;
      > background-color:#999999;
      > }
      > </style>
      >
      > <script language="JavaScript" type="text/javascript">
      >
      > var animtest = {};
      > animtest.init = function() {
      > var myanim = new YAHOO.util.Anim("sample", {opacity: {from: 0, to:
      > 1}, width: {to: 400}, height: {to: 400}}, 1);
      > myanim.animate();
      > };
      >
      > YAHOO.util.Event.addListener(window, 'load', animtest.init);
      > </script>
      > </head>
      > <body>
      > <div id="sample">
      > TESTme
      > </div>
      > </body>
      > </html>
      >
      > Hope this helps. Good luck with your project!
      >
      > Regards,
      > Eric
      >
      >
      > On May 29, 2006, at 1:38 PM, Patrick Sullivan wrote:
      >
      > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      > > "http://www.w3.org/TR/html4/strict.dtd">
      > > <head>
      > > <meta http-equiv="Content-Type" content="text/html;
      > > charset=iso-8859-1">
      > > <title>Untitled Document</title>
      > >
      > > <style type="text/css">
      > >
      > > #sample{
      > > opacity: 0;
      > > width: 0;
      > > height: 0;
      > > background-color:#999999;
      > > }
      > > </style>
      > >
      > > <script language="JavaScript" type="text/javascript">
      > >
      > > var animtest = {};
      > > animtest.init = function() {
      > > var myanim = new YAHOO.util.Anim("sample",
      > > {opacity: {from: 0, to: 1}, width: {to: 400}, height: {to: 400}}, 1};
      > >
      > > var animate = function(e) {
      > > myanim.animate();
      > > return false;};
      > > YAHOO.util.Event.addListener(document, "click", animate);
      > > };
      > >
      > > YAHOO.util.Event.addListener(window, 'load', animtest.init);
      > > </script>
      > > </head>
      > > <body>
      > > <div id="sample">
      > > TESTme
      > > </div>
      > > </body>
      > > </html>
      >
      >


      --------------------------------------------------------------------------------


      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.1.392 / Virus Database: 268.7.4/351 - Release Date: 5/29/2006
    Your message has been successfully submitted and would be delivered to recipients shortly.