jeudi 16 avril 2015

Need help using prototypeJS

I have some issue with prototypeJS today which I am using for a new project so here's my code :



var div = $('addcontact');
Event.observe(div, 'click', respondToClick);
function respondToClick(event) {
var form = $('contactForm');
form.setStyle(
{display : initial}
);
}


I don't understand why it is not working, $('contactForm') has a display : none as a css property, so what I want to do is display it when clicking on $('addcontact').


Aucun commentaire:

Enregistrer un commentaire