[ 2 posts ]

John Ward

  • Username: spyderman4g63
  • Joined: Mon Aug 08, 2011 6:37 am
  • Posts: 1
  • Twitter: spyderman4g63
  • Offline
  • Profile

Apply tooltip by class

Post Posted: Mon Aug 08, 2011 6:38 am
+0-
How can I add a YAHOO.widget.Tooltip for every element in X class?

sjJNL

  • Username: sjJNL
  • Joined: Thu Jul 08, 2010 6:58 am
  • Posts: 42
  • GitHub: sjJNL
  • Gists: sjJNL
  • Offline
  • Profile
Tags:

Re: Apply tooltip by class

Post Posted: Thu Mar 08, 2012 1:52 pm
+0-
If you are still looking for a solution, here is how I do it -

//Tooltip
var elements = YAHOO.util.Dom.getElementsByClassName('ttButton', 'a');
var ttBtn = new YAHOO.widget.Tooltip("ttBtn",
{ context:elements,
effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.20 }
});


Give the anchor elements a class of "ttButton"
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum