Hi,
Have a list of dates that when clicked changes the colour of the text by changing the class of the surrounding div
responseNOW = selected date / response = normal
can anyone tell me how to make dates that arent clicked go back to class response
Have a list of dates that when clicked changes the colour of the text by changing the class of the surrounding div
responseNOW = selected date / response = normal
Code:
<div id="01/01/2009" class="responseNOW"><a href="#" onclick="setdate('01/01/2009');">01/01/2009</a></div>
<div id="02/01/2009" class="response"><a href="#" onclick="setdate('02/01/2009');">02/01/2009</a></div>
function setdate(date) {
var NAME = document.getElementById(date)
NAME.className="responseNOW"
}
can anyone tell me how to make dates that arent clicked go back to class response