[development] jquery 1.0 release imminent

Konstantin Käfer kkaefer at gmail.com
Tue Aug 22 13:33:46 UTC 2006


Morbus,

just set the tooltips as "settings" (see http://drupal.org/node/76637)
and add a class to the HTML element. In the auto attached js, you can
attach onmouseover/onmouseout handlers that retrieve the correct
setting for the element. And you're done.

2006/8/22, Morbus Iff <morbus at disobey.com>:
> > I mentioned that I started playing with jQuery, when I put the finishing
> > touches on my hovertips module I planned to contribute it (for 4.7.x):
> >
> > http://dave-cohen.com/node/1186
>
> I never did like this particular implementation. There are four types:
>
>   * Inside spans: <p>Whee! <span>you're hovering!</span></p>, which makes
>     it really ugly for screen readers or just general DOM goodness.
>
>   * External divs, like you: <p>Whee</p> <div>you're hovering!</div>
>     Also can be ugly depending on where you place all the divs (at the
>     very end of the document? is that cleanly possible?). Would require
>     you to match up IDs in two different places though.
>
>   * Alt/title hovers - based on the value of the title text. <p title=
>     "you're hovering!">Whee!</p>. This one's bad because you can't use
>     HTML in your tip very cleanly.
>
>   * JS events, such like <p onmouseover="tooltip_on('you're hovering!')"
>     onmouseout="tooltip_off()">Whee!</p>. I tend to like this one (and
>     implemented it in my game.module, not via jQuery though) the most
>     because it a) doesn't pollute the DOM, b) don't harm screen readers,
>     c) allows HTML, d) keeps everything in one place, e) doesn't require
>     bookkeeping (which ID goes with this element?).
>
> Comments?
>
> [1] http://cvs.drupal.org/viewcvs/drupal/
>      contributions/modules/game/game.moduleview=markup
>
> --
> Morbus Iff ( omnia mutantur, nihil interit )
> Technical: http://www.oreillynet.com/pub/au/779
> Culture: http://www.disobey.com/ and http://www.gamegrene.com/
> icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
>


More information about the development mailing list