Working with Classes

Within many of the Javascript libraries that are floating around at the
moment there is a lot of code duplication. The thing I’m thinking about most
here is checking if an element has a class, and adding a class if it doesn’t
exist. This isn’t only in webbased toolkits, like
YUI and
Prototype, but
Joe Hewitt‘s
Firebug also defines
these functions, and I’m sure most people doing any sort of slightly more
complex web development needs, or could do with these being defined at a
browser/platform level.

A cursory glance of the the WHAT-WG specs doesn’t show anything regarding this sort of modification. I’m interested in what other
people have to say about it.

One thought on “Working with Classes

  1. Your still posting heh?, ever get the feeling no one is listening/reading? and that i am your best commentator and for which you are dearly in debt to my service in which im billing you for today inwhich i will use the proceeds to better my englihs.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>