Open Eddyhzz opened 5 months ago
Solution: To display specific slides in jsPsych, you can use the jsPsych.init() function to initialize your experiment and define your slides in the timeline parameter. Then, you can use the jsPsych.startExperiment() function to start your experiment and specify the slides to be displayed according to your needs.
var myTimeline = [
{
type: 'display-slide', // here are the parameters for the slideshow
// This is where the slideshow's parameters are set.
// ...
}, {
{
type: 'display-slide', // Here are the parameters for the slide // ... }, { type: 'display-slide', // Here are the parameters for the slide
// Here are the parameters for the slideshow.
// ...
}, { type: 'display-slide', // Here are the slideshow parameters // ...
// Add more slides...
];
// Initialize the experiment
jsPsych.init({
timeline: myTimeline, // initialize the experiment...
// Other initialization options...
});
// Specify the index of the slide to be shown here
var slideIndexToShow = 1; // For example, show the second slide
// Start the experiment and show the specified slide
jsPsych.startExperiment({
timeline: myTimeline.slice(slideIndexToShow), // other options...
// Other options...
});
Describe the bug When attempting to implement a redirect to a specific page using jsPsych, the expected behavior is not observed.
To Reproduce Steps to reproduce the behavior:
Expected behavior Upon reaching the designated point in the experiment, the participant should be redirected to the specified page seamlessly.
Additional context The experiment setup includes various trials and tasks using jsPsych. The redirect functionality is crucial for navigating participants to the next phase or providing supplementary information.