Hi, I'm trying to do a very simple button that changes color based on mouseover, mouseout and click, I'm doing this in prototype and the weird thing is if I used mouseover and mouseout, after I clicked on the button, the button wouldn't change to white, seems like it is because of the mouseout, here's my code
$("izzy").observe('mouseover', function() {
$('izzy').setStyle({ color: '#FFFFFF' });
});
$("izzy").observe('mouseout', function() {
$('izzy').setStyle({ color: '#666666' });
});
$("izzy").observe('click', function() {
$('izzy').setStyle({ color: '#FFFFFF' });
});
how can I fix it? Thanks.