Re: id bodyContent in documents not in news items

Geir B?kholt <[email protected]> Thu, 18 Mar 2004 00:39:49 +0100
Newsgroups gmane.comp.web.zope.plone.design
Organization elvix
Message-ID <[email protected]>
Hello Michael,

Thursday, March 18, 2004, 12:27:08 AM, you wrote:

> is looking up a single class slower than looking up an id? is looking up
> 5 classes much slower than looking up one? as far as i've seen, even the
> external link js is pretty fast, even on old machines.

> or am i wrong when i think you want an id for speed reasons?

Looking up a class means looping through all the nodes (or at least a
selection of nodes, if you know what kind of element it is), looking
for a string match on the class (argh!) , while ids can be accessed
directly, with getElementById()

So, the difference is really between lots-of-pain (which i really
don't care that much for) or the normal, agreed-upon way of doing
stuff

There is no need for you to be a js-wiz, Michael, - but there is
really a need for *one* id that wraps the contents of all
content-type-templates.

:)

--
Geir Bækholt
[email protected]




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click