@jspsych-contrib/plugin-html-swipe-response
v2.0.0
Published
This plugin collects responses to an arbitrary HTML string using swipe gestures and keyboard responses.
Readme
html-swipe-response
Overview
This plugin displays HTML content and records responses generated by swipe gestures, keyboard, and button responses. This is ideal for two-alternative forced choice assessments that will be administered on both mobile and desktop platforms. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time.
Setting the stimulus_duration parameter while using the swipe modality can result in a user experience issue, wherein the user must swipe a stimulus div tag that has been hidden after the stimulus duration has elapsed. To solve this, this plugin wraps the stimulus div tag in another tag with the ID #jspsych-html-swipe-response-stimulus-container. This div tag can then be styled so that they user has some visual representation of the stimulus even after the #jspsych-html-swipe-response-stimulus-container div has been hidden.
The plugin now ensures that both the container (#jspsych-html-swipe-response-stimulus-container) and the stimulus (#jspsych-html-swipe-response-stimulus) move together when dragged, providing a unified and seamless interaction.
Loading
<script src="https://unpkg.com/@jspsych-contrib/[email protected]"></script>Compatibility
jsPsych v8.0. For compatibility with jsPsych v7.0, use version 1.1.2 of this plugin.
Documentation
See documentation
Author / Citation
Adam Richie-Halford, Kruttika Bhat
Citation:
Pending
