Hello, I have an array with li, I need to compare the values of the attributes, they all need to be the same .. example ..
I have 2 li within a ul
<li onclick="controle.selecionarVolta(this)" data-id="3" data-name="Rotina 3" data-criar="0" data-leitura="0" data-alterar="0" data-deletar="0" data-visitante="0" style="background: none;">Rotina 3</li>
<li onclick="controle.selecionarVolta(this)" data-id="3" data-name="Rotina 3" data-criar="0" data-leitura="0" data-alterar="0" data-deletar="0" data-visitante="1" style="background: none;">Rotina 2</li>
I need to check if all date values are the same as both ...
data-name, date-create, date-change, date-delete, and date-visitor.
All must contain the same value, if they have the same value, it returns true;
I'm getting these li's this way ..
var lista = document.querySelector('.rotinas_selecionadas').getElementsByTagName('li')
Then I have to go through this list, and check if all the data I said above are the same ...
Thank you in advance.
Sorry, I put it as an array, actually it's objects