1
I have a list:
<ul id="lista">
<li><span class="datas">01/01/2020</span></li>
<li><span class="datas">02/01/2020</span></li>
<li><span class="datas">03/01/2020</span></li>
<li><span class="datas">04/01/2020</span></li>
<li><span class="datas">05/01/2020</span></li>
</ul>
And an Array of dates:
var datas_especiais = ["03/01/2020", "05/01/2020"];
I would like to compare the dates of my array with the dates of my list, if the dates are equal I want to add the event class in the row of my list where the date is equal so that the final result is this
<ul id="lista">
<li><span class="datas">01/01/2020</span></li>
<li><span class="datas">02/01/2020</span></li>
<li class="evento"><span class="datas">03/01/2020</span></li>
<li><span class="datas">04/01/2020</span></li>
<li class="evento"><span class="datas">05/01/2020</span></li>
</ul>
What have you ever tried to accomplish?
– Sergio