[thelist] Suggestions for naming conventions for CSS id/class & javascript variable

Jack Timmons jorachim at gmail.com
Wed Jan 14 13:59:17 CST 2009

On Wed, Jan 14, 2009 at 1:53 PM, ivo <cervantes_vive at yahoo.com> wrote:

> Any suggestions for approaches when naming HTML elements ids and classes?
> And corresponding JavaScript variables?
> I am working towards a component based approach for my HTML/JS elements.
> What conventions are already in use to prevent naming collisions and to
> allow tightly coupling js code with html?
> Thanks,
> - Ivo
> --

If you want to prevent collisions, prefix you names with the name of the js
package. (jq_this or alphaspaghetti_calendar) If you want a naming
convention, how about naming them what they are?

-Jack Timmons
Twitter: @jorachim

More information about the thelist mailing list