I noticed the document.getElements is not working for ejs files. as in below code, I need to display: none the div class="delegate".
myscripts.js
document.getElementsByClassName("delegate").style.display="none";
index.ejs
<div class="delegate">
<p>helooo</p>
</div>
the error message shows in browser: Cannot set properties of undefined (setting 'display')
can you please help me to understand.