Exactly. It is senseless to use 200 classes when you have a big list, just
make them unique IDs (item_100, item_156, etc) and speed up the queries a
little bit.

On 1/19/07, Su <[EMAIL PROTECTED]> wrote:

Seriously. You've succeeded in making yourself misunderstood. Now what?

You can't put ids and classes next to each other for comparison like this
and then write one off. It doesn't work; they don't even do the same thing..


On 1/19/07, Matt Stith < [EMAIL PROTECTED] > wrote:
>
> So.... clarify.. why are IDs so bad? Just because they are overused?
>
> On 1/19/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED] > wrote:
> >
> > Don't get me wrong, I use an occasional id. But ids are over used.
> > Sure jQuery selects a single element faster with an id than with a
> > class, but that's only the beginning of a good chain of jquery!
> >
> > With a properly formatted html/xml, you can deal with the ancestors,
> > children, siblings, prev, next, and filter. That's why xml, xsl,
> > xquery, xpath, and jQuery are cool technologies (in my mind) and text
> > files and last millennium javascript programs are not.
> >
> >
> > The reason I'm posting this is I made a reference to this  motto, that
> > might be misunderstood.
> >
> >     "IDs are a crutch for the weak. Classes are for the strong."
> >
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/



_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to