I have this selectats2 struts tag, where parameters is a list of Item objects. Let say that the class java bean class has the following 3 properties: itemId, itemLabel, itemDescription .
My select tag looks like this:
<s:select headerKey="" headerValue="Select Item" list="myModel.itemsList" listKey="itemId" listValue="itemLabel" name="selectedItem" />
I would like to show a tooltip for each option in the drop-down menu when the user views this option. The text to fill this tooltip is stored in the itemDescription property of my java bean class
I know that you can specify tooptip for the select tag, but this is not what I need, since each parameter / element has a different description.
I currently have a special javascript tooltip, and I would like to use this function if possible. This is how I will use this function if the items are listed in the table:
<td> <span class="tooltip" onmouseout="tooltip.hide();" onmouseover="tooltip.show('<s:property value="item.description" />');"> <s:property value="item.label" /> </span> </td>
Does anyone know what would be the best solution to show description as a tooltip every time a user hangs over an option?
source share