Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add tooltip to img

 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add tooltip to the following img?
I tried more than 1 day but still no success.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the title attribute. The alt attribute is used to provide alternative text describing the image in the event the image cannot be displayed (or for use by screen readers).
 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Use the title attribute. The alt attribute is used to provide alternative text describing the image in the event the image cannot be displayed (or for use by screen readers).


This compiles ok but has no tooltip.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sever-side markup is not helpful. What HTML does that render at the browser? Is the title attribute empty?
 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The sever-side markup is not helpful. What HTML does that render at the browser? Is the title attribute empty?

I have two img but I only added "title" to one img.
After adding "title" to the second img, then the tooltip appeared.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic