what name spacing to use for div id's and classes? |
[eluser]CroNiX[/eluser]
But to the original posters question, it doesn't matter how you name your html attributes, just as long as they are valid and they makes sense to your application and maintaining it.
[eluser]jmadsen[/eluser]
Yeah, I think something is backwards here. Working with "data" attributes, for example , standard naming is: "data-mytable_id" No hyphens in variable names; use underscores. Hyphens are fine in class & id & attribute names.
[eluser]webmastergrumpy[/eluser]
No clear answer yet. JQuery uses - in class names so id's with underscore and class names with - ?
[eluser]LuckyFella73[/eluser]
Aken posted: Quote:This is backwards. Javascript prefers underscores. Isn't that clear? I prefer to name my classes and ids the same way and never had a problem using javascript yet (caused by "-" or "_"). |
Welcome Guest, Not a member yet? Register Sign In |