How can I pass a class name to the YUI2tooltip: http://developer.yahoo.com/yui/examples/container/tooltip.html instead of an ID?
I attempted to do this:
YAHOO.example.container.tt1 = new YAHOO.widget.Tooltip(
YAHOO.util.Dom.getElementsByClassName('annotation-rating'), {
context:"ctx",
text:"My text was set using the 'text' configuration property"});
YAHOO.example.container.tt2 = new YAHOO.widget.Tooltip(
YAHOO.util.Dom.getElementsByClassName('annotation-rating'), {
context:"link" });
Since YAHOO.widget.tooltip can only accept one element, the selector needs to be more specific: