diff --git a/plugins/jspsych-instructions.js b/plugins/jspsych-instructions.js index 075dbd75..6011c7ed 100644 --- a/plugins/jspsych-instructions.js +++ b/plugins/jspsych-instructions.js @@ -84,24 +84,22 @@ jsPsych.plugins.instructions = (function() { if (trial.show_clickable_nav) { var nav_html = "
"; - if (current_page != 0 && trial.allow_backward) { - nav_html += ""; - } - nav_html += "
" + // if (current_page != 0 && trial.allow_backward) { + // nav_html += ""; + // } + // nav_html += "" display_element.innerHTML += nav_html; - if (current_page != 0 && trial.allow_backward) { - display_element.querySelector('#jspsych-instructions-back').attachEventListener('click', function() { - clear_button_handlers(); - back(); - }); - } - - display_element.querySelector('#jspsych-instructions-next').attachEventListener('click', function() { - clear_button_handlers(); - next(); - }); + // if (current_page != 0 && trial.allow_backward) { + // display_element.querySelector('#jspsych-instructions-back').addEventListener('click', function() { + // clear_button_handlers(); + // }); + // } + // + // display_element.querySelector('#jspsych-instructions-next').addEventListener('click', function() { + // clear_button_handlers(); + // }); } } @@ -111,29 +109,29 @@ jsPsych.plugins.instructions = (function() { display_element.querySelector('#jspsych-instructions-back').removeEventListener('click'); } - function next() { - - add_current_page_to_view_history() - - current_page++; - - // if done, finish up... - if (current_page >= trial.pages.length) { - endTrial(); - } else { - show_current_page(); - } - - } - - function back() { - - add_current_page_to_view_history() - - current_page--; - - show_current_page(); - } + // function next() { + // + // add_current_page_to_view_history() + // + // current_page++; + // + // // if done, finish up... + // if (current_page >= trial.pages.length) { + // endTrial(); + // } else { + // show_current_page(); + // } + // + // } + // + // function back() { + // + // add_current_page_to_view_history() + // + // current_page--; + // + // show_current_page(); + // } function add_current_page_to_view_history() { diff --git a/plugins/jspsych-survey-multi-choice.js b/plugins/jspsych-survey-multi-choice.js index 6cd51433..a631b589 100644 --- a/plugins/jspsych-survey-multi-choice.js +++ b/plugins/jspsych-survey-multi-choice.js @@ -133,7 +133,7 @@ jsPsych.plugins['survey-multi-choice'] = (function() { } } // add submit button - trial_form.innerHTML += 'Submit Answers'; + trial_form.innerHTML += ' next '; trial_form.addEventListener('submit', function(event) { event.preventDefault(); @@ -145,17 +145,15 @@ jsPsych.plugins['survey-multi-choice'] = (function() { // create object to hold responses var question_data = {}; - //TODO this is having problems var matches = display_element.querySelectorAll("div." + plugin_id_name + "-question"); var inputs = document.getElementsByTagName('input'); var radios = [] - for(var i=0;i