In the below code, I have used handlebars.js for templating in which it creates each donation from the server but the onClick event doesn't affect all the iterated div, it only affects the first div. How to fix such an issue using handlebars.js?
{{#each donations}}
<div id="changeCss">
<h1>Donar name: {{donar}}</h1>
<h1>Food item:{{fooditems}}</h1>
<h1>Quantity:{{quantity}}</h1>
<h1>Meeting point: {{meetingpoint}}</h1>
<h1>Food type: {{foodtype}}</h1>
<h1>Contact no: {{contactno}}</h1>
<button onclick="changed()" id="idOfButton">I will deliver</button>
</div>
{{/each}}
<script>
function changed(){
document.getElementById('changeCss').style.cssText ='background-color:green; color:white' ;
document.getElementById("idOfButton").disabled= true;
</script>