[development] jquery 1.0 release imminent
Dave Cohen
drupal at dave-cohen.com
Thu Aug 24 18:00:43 UTC 2006
On Thursday 24 August 2006 06:06, Morbus Iff wrote:
> > exploit the implicit iteration as much as possible. It seems to me the
> > nicest model would be something like:
> >
> > <div class="link-with-tip">
> > <a href="foo">bar</a>
> > <div class="tip">Arbitrary HTML to display on hover</div>
> > </div>
>
> This model seems to fall down under anything but demonstration purposes:
>
> <p>This is a paragraph <a href="">which can't contain a div</a></p>
> <div>DOM model is now broken since div can't go in p.</div>
>
> To which you'd respond:
>
> <div class="link-with-tip">
> <p>This is a paragraph <a href="">which can't contain a div</a></p>
> <div>DOM model is now fixed.</div>
> </div>
>
I would have responded:
<p>This is a paragraph
<span class="link-with-tip">
<a href="">which can't contain a div</a>
<span class="tip">This is based on element class.</span>
</span>
</p>
In other words, use the classes, not the element types to control the tips.
I'll be testing my tooltip script to make sure this works.
-Dave
More information about the development
mailing list