I have a tricky question that I cannot wrap my head around:
My web application is using jsf/primefaces for most of its content, and there are lots of information available to the user only via the primefaces - tag. Ie:
<h:outputText id=myText" value="someValue" />
<p:toolTip for="myText">Some describing content</p:toolTip>
Markup would be generated like this:
<span id="parentForm:myText">someValue</span>
<div id="parentForm:j_id_m_5_1_7" class="ui-tooltip ui-widget ui-tooltip-right" style="display: none;">
<div class="ui-tooltip-arrow">
</div>
<div class="ui-tooltip-text ui-shadow ui-corner-all">Some describing content
</div>
</div>
Where "parentForm"
is a generic parameter not related to the case.
div class=ui-tooltip is the tooltip, while the span is
Since the elements that have attached tooltips are many and diverse, is there a global way I can add some style to all those elements that trigger the tooltip (ie if they are <span>
s or <label>
s or <div>
s in the computed code), so that I could signify the items that had tooltips with some kind of differentiating feature? This is probably a js - issue that would need to know what's similar between elements with a tooltip...
Clarification: I want to style the elements that trigger the tooltips, not the tooltips themselves. In the example above, this would be the span
, not the div id=ui-tooltip
.
Not sure how PrimeFaces make their tooltips work...