I’m looking for tips on how to be able to click on a word in an html document and then for the page to update and show a definition of the word that has been clicked. It can appear at the bottom of the page. So far I’m just adding an onclick into the p tag so for instance. Am I going about this in the right way? I’m quite bad at javascript so any help with this would be great. Many thanks
<p id="complexword1" onclick="functionToDisplayComplexWord()">
I think it might help you to resolve your issue.
HTML:
Javascript:(Jquery lib)
DEMO