Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
see the part in red?
document.getElementById(tgt.id).style.textTransform="capitalize";
Any time you are manipulating a node's style object, the result is a manipulation of that element's inline CSS rules. CSS properties which would have been expressed with a dash (font-weight, font-size, list-style, margin-top, etc.) are expressed in camelCase. This could be a good lesson for you, since manipulating styles is a key element of client-side JavaScript.
|