I am building a website for language learners. When user sees a word they don't know they click on it and a JavaScript function will run.
So far I have a hand made function that finds the text being clicked. It works but seems not ideal.
Is there a way to make all text inside a <p>
for example "clickable"?
Or is there a JavaScript library function to tell which word has been clicked?