samedi 30 avril 2016

Java script function error

I want the close and function to modify the variable gate, by making the padding bigger until it equals the variable open. I don't know why it won't work, please help.

function wait() {
    setTimeout(100);
}

function close() {
    var closed = 1;
    var opened = 19;
    var gate = opened;

    while (gate !== closed) {
        gate-=1;
        gate.style.paddingTop = open'%';
        wait();
    }
}




Aucun commentaire:

Enregistrer un commentaire