js query all ellements and setAttribute() on all elements with class of foo code example
Example: js queryselector names
// This selects the first element with that name
document.querySelector('[name="your-selector-name-here"]');
// This selects the first element with that name
document.querySelector('[name="your-selector-name-here"]');