I have a Boolean variable. It is stored in a hidden input field. Basically, if the user is signed in, it is false, if not, it is true.
false
true
Ther
You can simply loop through the elements instead of just taking the 0th.
var buttons = document.getElementsByClassName('project_download_btn'); for(var i=0; i< buttons.length; i++){ buttons[i].hidden = true; }