Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/forms/writing-evaluation-form.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {useState} from 'react';
import '../../utils/jquery';

const WritingEvaluationForm = () => {
const [essay, setEssay] = useState('');
Expand Down
32 changes: 32 additions & 0 deletions src/utils/jquery.js
Original file line number Diff line number Diff line change
@@ -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);
});


}