Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple tool tips to be displayed on same page when we click multiple imagelinks

 
kishi kiran
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have i am trying to implement tooltip through javascript,
like when we click on an image link tooltip should be displayed and it should have closebutton/close image to close that tooltip.
like the same way i will have multiple images on page, when ever i click on the images all tooltips should be displayed on the page when ever i want to close that then only it should close through close button on tooltip.

can any one help me on this, i need a sample example to implement this.

can we do it through java script or will go for jquery.

i am new for both.

Thanks in advance.
Kiran.
 
Tim Holloway
Bartender
Posts: 18419
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you are describing is not, strictly speaking, tooltips.

Tooltips are small windows that pop up when you hover over an area of interest, then automatically dismiss themselves after a short interval or after you move the mouse away. They don't have controls, and notably don't have close buttons, since they don't need them and they're intended to obscure as little of the display as possible.

There are custom tags that implement tooltips in many of the JSF extension libraries such as RichFaces. However, the essential functionality comes from Javascript code that they bind to their target elements.

This function is as follows:

1. ensure that the target element is bound to tooltip Javascript functions called, for example, when you mouse over the control.

2. The actual tooltip is just a small floating HTML DIV element which is normally hidden. When the "display tooltip" function is invoked, that function makes it visible. The DIV is then made invisible again when the mouse has moved away (mouseout function) or a suitable interval has expired.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!