[development] Javascript Tools and Backport: developer-interest modules

Morbus Iff morbus at disobey.com
Wed Apr 19 16:28:45 UTC 2006


> Also, as you develop new JS tools, please consider adding them to this 

I just finished a "I'm totally not a JS developer" hover tooltips:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/game/game.js?view=markup
Example usage:

  drupal_add_js(drupal_get_path('module', 'game').'/game.js');
  theme('game_tooltip', 'real', 'tooltip');
  l('real', 'url', theme('game_tooltip_attributes', 'tooltip', 'block'))

The final parameter of either approach (here 'block') sets the tooltip 
to use a different CSS ID, appended to 'tooltip_' (so, here, the final 
CSS ID set on the DIV would be 'tooltip_block'.

Like I said, I suck at JavaScript, but this works for me. Demo here:

  http://feast-or-fa.mine.nu:8888/drupal/?q=node/123

The "robot" on the lefthand side is #tooltip_block, and the 
abbreviations on the right hand side are normal #tooltips.

-- 
Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
O'Reilly Author, Weblog, Cook: http://www.oreillynet.com/pub/au/779
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus


More information about the development mailing list