List of used Class Names


#1

This may already be possible (if it is then please let me know how to accomplish it) - I’d like the ability to identify if I have already used a class name somewhere in my project. This would save time troubleshooting when a scene gets complicated with lots of new elements and accidentally naming one the same as an existing element.


Class and ID list
(Greg) #2

this will tell how many elements have a certain class name.

var z = document.getElementsByClassName('myClassName').length;
alert (z);

It will return a 0 (zero) if no elements are found with the class named “myClassName”


(Mark Hunte) #3

I have made a template that will allow you to have a place where you can see the used classes and their ids.


#4

Thanks Mark and Greg


(Mark Hunte) #5

I have added a second template which I think is better.


(Mark Hunte) #6

Hopefully this is my last iteration of this :blush: