javascript - Change text when image is clicked -


does know why paragraphs not changing when image clicked? enter image description here

i suspect you're getting errors in browser console, syntax error.

it's because text strings you're inserting have " in them. try escaping characters \" instead, on line 17 , 18.

your browser things ending string, because sees quote, in reality, that's part of string. using \" means "don't use closing quote, print out quote character".

alternatively, change strings start , end single quote ', you'd have escape single quotes in string \'.


Comments