I am currently organizing tournaments all year round, with prices increasing daily. While the code is functional, I'm struggling to figure out which elements need adjusting to display multiple prices that adjust simultaneously. I attempted changing "rate" to "rate1", but that didn't solve the issue... so it seems variables within should also be modified. Any assistance on this matter would be greatly appreciated. The specific page I'm working on can be found here: -- The snippet below represents what I am currently focusing my efforts on. Thank you in advance for your help.
<div class="eventbox mlk activebox"><img src="https://fiftyallstars.com/Images/jammlk.gif" class="holidayback">
<span class="eventlabel tourney">MLK DAY SHOWCASE</span><br><div class="numberfont eventdetails">
January 17-18, 2022<br>
Grades: 1st-8th<br>
Current Price: <div class="rate" style="display: inline; font-weight:bold;"></div>
<script type="text/javascript">
const days = (date) => Math.ceil(date.getTime() / (24 * 60 * 60 * 1000));
const DEADLINE = days(new Date("2022-01-10"));
const START = days(new Date("2021-10-01"));
const TODAY = days(new Date());
const res = Math.round(400 - 300 * ((DEADLINE - TODAY) / (DEADLINE - START)));
console.log(res);
document.querySelector('.rate').append(`$${res}`)
</script>
<br>
</div>
<table class="buttontable"><tr><td><a href="javascript:void(0);" class="eventlink"><div class="eventbutton">Brackets</div></a></td><td><a href="javascript:void(0);" class="eventlink"><div class="eventbutton">Register</div></a></td></tr></table>
</div>
<div class="eventbox "><img src="https://fiftyallstars.com/Images/jamabe.png" class="holidayback">
<span class="eventlabel">PREZ DAY CHALLENGE</span><br><div class="numberfont eventdetails">
February 17-18, 2022<br>
Grades: 1st-8th<br>
Current Price: <div class="rate" style="display: inline; font-weight:bold;"></div>
<script type="text/javascript">
const days = (date) => Math.ceil(date.getTime() / (24 * 60 * 60 * 1000));
const DEADLINE = days(new Date("2022-02-10"));
const START = days(new Date("2021-10-01"));
const TODAY = days(new Date());
const res = Math.round(400 - 300 * ((DEADLINE - TODAY) / (DEADLINE - START)));
console.log(res);
document.querySelector('.rate').append(`$${res}`)
</script>
<br>
</div>
<table class="buttontable"><tr><td><a href="javascript:void(0);" class="eventlink"><div class="eventbutton">Brackets</div></a></td><td><a href="javascript:void(0);" class="eventlink"><div class="eventbutton">Register</div></a></td></tr></table>
</div>