I have an array like the following:
aVN = new Array();
aVN.push(new Array('CET', 'July', 'Birthday', '20110704'));
aVN.push(new Array('CGT', 'July', 'Anniversary', '20110705'));
I also have multiple <li>
elements in my html like this:
<li id="thismonth">
<ul>
<li id="20110701">1</li>
<li id="20110702">2</li>
<li id="20110703">3</li>
<li id="20110704" onclick="displayevent();" class="holiday">4</li>
<li id="20110705">5</li>
</ul>
I want to check whether 20110704
from the array aVN
is present in the IDs of the <li>
s.
If the ID and the array value match, then I want to display "Birthday" (the text from the array) when I click on that particular <li>
.