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

Re: [ydn-javascript] Re: Anyone been able to use Tooltip with Button?

Expand Messages
  • Todd Kloots
    Benjamin - It is easy to do, and here is an example: http://yuiblog.com/sandbox/yui/v231/examples/button/example02.html The key thing to remember is that when
    Message 1 of 4 , Oct 3, 2007
    • 0 Attachment
      Benjamin -

      It is easy to do, and here is an example:

      http://yuiblog.com/sandbox/yui/v231/examples/button/example02.html

      The key thing to remember is that when you set the "title" configuration
      attribute it gets applied to the Button instance's HTML <BUTTON>
      element, which is a child node of the Button instance's root node. So,
      all you need to do is pass that HTML <BUTTON> element reference as the
      value for your Tooltip's "context" configuration property and you're all
      set.

      I hope that helps you with your project.

      - Todd

      Caridy PatiƱo Mayea wrote:
      >
      > You can use the "Tooltips" YUI plugin to display the tooltips for
      > different types of DOM
      > elements.
      > http://www.bubbling-library.com/sandbox/tooltips/tooltips-other-elements.html
      > <http://www.bubbling-library.com/sandbox/tooltips/tooltips-other-elements.html>
      > http://www.bubbling-library.com/sandbox/tooltips/tooltips-default-bubbling.html
      > <http://www.bubbling-library.com/sandbox/tooltips/tooltips-default-bubbling.html>
      >
      > Best Regards,
      > Caridy (caridy at gmail.com)
      > http://www.bubbling-library.com/ <http://www.bubbling-library.com/>
      >
      > --- In ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com>, "benjamin_m_hill"
      > <benjamin_m_hill@...>
      > wrote:
      > >
      > > I pasted incorrectly. The issue still remains, unfortunately!
      > >
      > > var contextElements = [];
      > > var flagButtons = [];
      > > flagButtons.push(new YAHOO.widget.Button("flag_bs", {title : "Are you
      > > sure?", onclick : {fn : onButtonClick }}));
      > > contextElements.push('flag_bs');
      > > tt = new YAHOO.Tooltip("tt", { context:contextElements } );
      > >
      > >
      > > --- In ydn-javascript@yahoogroups.com
      > <mailto:ydn-javascript%40yahoogroups.com>, "benjamin_m_hill"
      > > <benjamin_m_hill@> wrote:
      > > >
      > > > I'm trying to get tooltips working with buttons.
      > > >
      > > > Example:
      > > >
      > > > flagButtons = [];
      > > > flagButtons.push(new YAHOO.widget.Button("flag_bs", {title : "Are you
      > > > sure?", onclick : {fn : onButtonClick }}));
      > > > .....
      > > > tt = new YAHOO.widget.Tooltip("tt", { context:contextElements } );
      > > >
      > > > This doesn't seem to result in tooltips being shown. I've also tried
      > > > having the "title" in the HTML, same result - no tooltips.
      > > >
      > > >
      > > > So, has anyone out there gotten Tooltips working with Button, and if
      > > so,
      > > > how did you do it? Thanks!
      > > >
      > >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.