Ian Pouncey wrote:
> > This is the same idea as the PPK code, as there is still a hook
> > required - the wrapper element.
Thierry Koblentz wrote:
> No, it is not "required".
> Using a DIV as a "hook" is not for making the script work but to make sure
> we do not parse *every single link* in the document (i.e., there is a slight
> chance to find external URIs in the site navigation).
> The idea is to use the closer parent element that contains all of them (one
> that exists already)...
The point is the scripts are basically the same - if you remove the class check from PPK's code it is the same as removing the check from the wrapper from your code. As I said I think which way around you make the check depends on the structure of your page. For Eugenio's original scenario which is a page just containing external links I totally agree that your code is cleaner.
Thierry Koblentz wrote:
> Using a "class" is a totally different story as it belongs to the
> presenational layer and I'd say not supposed to convey any information.
Class isn't really presentational. It is to do with the structure of the document. In a crude way I see id as saying what an element is, and class saying what general purpose an element has
i.e. classifying it. The DOM uses classes for _javascript_ just as legitimately as CSS. For this case rel might be more appropriate, and as Mike says you can define your own values for that attribute - though you should try and make them make sense when read by someone who hasn't seen your markup before.
I'm having a great time discussing this topic, this is the wonderful thing about the web standards community. I think most people have an opinion on how things should be done, yet the majority are willing to hear what other people have to say. Sometimes they agree, sometimes not, but I think everyone learns something.
Ian.
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
- Re: [WSG] target=_blank Ian Pouncey
- Re: [WSG] target=_blank Thierry Koblentz
- Re: [WSG] target=_blank Thierry Koblentz
- Re: [WSG] target=_blank Ian Pouncey
- Re: [WSG] target=_blank Thierry Koblentz
- Re: [WSG] target=_blank Rimantas Liubertas
- Re: [WSG] target=_blank TuteC
- Re: [WSG] target=_blank TuteC
- Re: [WSG] target=_blank Christian Heilmann
- Re: [WSG] target=_blank Rimantas Liubertas
- RE: [WSG] target=_blank Richard Conyard
