Widget:Maple Quiz Filter

 /** * Function that filters Maple OX questions: **/ function filterQuestions { // Get the value to search / filter by   var questionText = document.getElementById("question-text").value.toUpperCase;

// Get all the questions var questionRowsToFilter = document.getElementsByClassName('questions-table')[0].rows;

// Go through every question, start at 1 because row 0 is the header row. for (var i = 1; i < questionRowsToFilter.length; i++) { // Get the skill information from the data attributes var question = questionRowsToFilter[i].cells[0].innerHTML;

// Check skill name var matchesSkillName = (question.toUpperCase.indexOf(questionText) > -1);

// If it matches all the filter / selects, then display the question. // Otherwise, hide the question. if (matchesSkillName) { questionRowsToFilter[i].style.display = ""; } else { questionRowsToFilter[i].style.display = "none"; }   } }

 Filter questions: 