• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tooltip mouseover/onclick events

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody know of some simple javascript code so when I mouse over a td element It shows up but when I click on a td element it stays up until the user clicks somewhere else.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote up such a plugin for jQuery in the chapter 8 code for jQuery In Action. You can download the code from http://www.manning.com/bibeault2. Look for the termifier.

As written, the tooltip is dismissed on clicking the tooltip itself. It should be easy to adapt to be dismissed by clicks elsewhere (in fact, that's one of the exercises outlined by the book).
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are tons of these types of things if you search the inter-webs. Bear's would require jQuery (not a bad thing) but if you aren't using it, lots of options exist. Just ask google for help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic