echo JHtml::tooltipText('Click me', 'This is a tooltip');
Click me
echo JHtml::tooltipText('Click me', 'This is a tooltip', array('class' => 'my-class', 'title' => 'Custom title'));
Click me
In this example, a custom CSS class is added to the HTML output along with a custom title attribute.
This method is part of Joomla's JHtml package/library, which is responsible for generating HTML markup for components and modules in Joomla.