How do I add onclick event with go to into a post?
-
Hello! I want to run a JavaScript inside a WP post:
<span class="aff" onclick="GoTo('URL')" target="blank">text</span>
When I add this code to a post the event doesn’t work and I have an error when I look at the console: “Uncaught ReferenceError: GoTo is not defined at HTMLSpanElement.onclick”.
Please, help to fix the issue. Thank you in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How do I add onclick event with go to into a post?’ is closed to new replies.