Skip to content

Commit

Permalink
reset routine after addition
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Aug 11, 2015
1 parent 1f55e66 commit ec80291
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pick.js
Expand Up @@ -66,7 +66,6 @@ function displayMenu() {
// update syllabus table
while (tbody.hasChildNodes()) tbody.lastChild.remove();

var routine = document.getElementById('routine');
var section = '1';

for (var i=0; i<figures.length; i++) {
Expand Down Expand Up @@ -96,7 +95,7 @@ function displayMenu() {
var span = document.createElement('span');
span.textContent = figures[index].name;
li.appendChild(span);
routine.appendChild(li);
document.getElementById('routine').appendChild(li);

// fetch steps
if (!figures[index].steps) {
Expand All @@ -107,6 +106,9 @@ function displayMenu() {

// clear stepname
document.getElementById('stepname').value = '';

// clear routine
clock = routine.length = 0;
});
} else {
// mark row as unavailable
Expand Down

0 comments on commit ec80291

Please sign in to comment.