Because you get this error: document.getElementsByClassName(...).forEach is not a function. This happens because ...
Lee mas