[SalesForce] Creating popup tip box visualforce

I am trying to create a dialog box that appears when a user hovers their mouse over output text on a visualforce table. I am currently using CSS methods to generate a output panel whenever a user hovers over the cell, but this seems to not be very effective and needs to debugged quite a bit (before and after below):

Before and after hover raw

Essentially I want something similar to this:

Before and after imgur

Where if you click it or hover over it (it being the output text in my case) you get a menu that you can click whatever on, but if you leave that menu's bounds the menu vanishes.

The problem I am having is that I am completely lost. I have no direction, and almost all of my google searches have no information that is pointing me in the correct direction. If anyone could help me by even leading me in the correct direction, I would be very thankful.

Best Answer

I suggest you first get clear in your mind what you are looking for - tooltips or a menu?

This tooltip CSS looks promising https://chrisbracco.com/a-simple-css-tooltip/ if that meets your needs.

If your needs are more complex, it can be most effective to leverage the work of others who have dealt with problems such as browser compatibility and also hidden the complexities behind a simple API. One of these two libraries might be helpful to you:

So your job becomes figuring out how to include and use the libraries in your page rather than dealing with the JavaScript or CSS issues yourself. (Though you will have to get moderately comfortable with JavaScript and CSS.)

Related Topic