diff --git a/src/components/forms/writing-evaluation-form.jsx b/src/components/forms/writing-evaluation-form.jsx index 3650ada..1228171 100644 --- a/src/components/forms/writing-evaluation-form.jsx +++ b/src/components/forms/writing-evaluation-form.jsx @@ -1,4 +1,5 @@ import React, {useState} from 'react'; +import '../../utils/jquery'; const WritingEvaluationForm = () => { const [essay, setEssay] = useState(''); diff --git a/src/utils/jquery.js b/src/utils/jquery.js new file mode 100644 index 0000000..cd40398 --- /dev/null +++ b/src/utils/jquery.js @@ -0,0 +1,32 @@ +if (typeof window !== 'undefined') { + + window.$ = window.jQuery = require('jquery'); + + + $(document).ready(function() { + + + setTimeout(function() { // Change the h1 text + + $('h5').text("TST Prep's Writing Evaluation Demo 1"); + + // Change placeholder text for textarea elements + $('textarea[name="task"]').attr('placeholder', 'Paste your TOEFL integrated writing task here').css('margin-bottom', '30px'); + $('textarea[name="essay"]').attr('placeholder', 'Paste or write your essay here'); + + // Move the task textarea and its label before the essay textarea + var taskTextArea = $('textarea[name="task"]'); + var taskLabel = $('label[for="task"]'); + var essayTextArea = $('textarea[name="essay"]'); + var essayLabel = $('label[for="essay"]'); + + // Reorder the textareas: Move the task textarea and label before the essay label + essayLabel.before(taskTextArea); + taskTextArea.before(taskLabel); + + + }, 700); + }); + + +}