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

Re: Tooltip Opacity

Expand Messages
  • Craig Holdaway
    Steven, No success thus far. I shifted the .setStyle out of the init function (as below) to confirm that this is called after load. I take it the tooltip
    Message 1 of 3 , Sep 6, 2006
    • 0 Attachment
      Steven,

      No success thus far. I shifted the .setStyle out of the init function
      (as below) to confirm that this is called after load.
      I take it the tooltip calls the render and show methods itself, as
      opposed to when using a Panel.

      I appreciate your assistance.
      Cheers


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
      <title>...</title>


      <script type="text/javascript" src="yahoo/yahoo.js"></script>
      <script type="text/javascript" src="yahoo/dom.js"></script>
      <script type="text/javascript" src="yahoo/event.js"></script>
      <script type="text/javascript" src="yahoo/container.js"></script>
      <script type="text/javascript" src="yahoo/animation.js"></script>
      <link rel="stylesheet" type="text/css" href="yahoo/container.css" />

      <script type="text/javascript">
      function init()
      {
      var myTooltip = new YAHOO.widget.Tooltip("myTooltip",
      {
      effect:
      {
      effect: YAHOO.widget.ContainerEffect.FADE,
      duration: 0.25,
      opacity: { from: 0.1, to: 0.5}
      },
      context:"SomeRandomText",
      text:"Drag Box",
      showDelay:500
      }
      );
      }

      function change_prop()
      {
      //alert("change_prop()");
      YAHOO.util.Dom.setStyle("myTooltip", "opacity", 0.5);
      }

      YAHOO.util.Event.addListener(window, "load", init);
      </script>

      </head>

      <body>
      <div id="SomeRandomText">
      <p>Lorem ipsum dolor sit amet</p>
      </div>
      <p>Lorem ipsum dolor sit amet</p>
      <p>Lorem ipsum dolor sit amet</p>
      <input type="button" onclick="javascript:change_prop();" />
      </body>
      </html>
    Your message has been successfully submitted and would be delivered to recipients shortly.