Archived topic
I want to add a button with an onclick handler that runs this JavaScript
1 reply · Started by wordpressuser13 on February 9, 2023
Viewing posts 1–2 of 2
This is the Javascript I want to run when I click the button:
document.querySelector("ruffle-embed, ruffle-object, ruffle-player").enterFullscreen();
Any idea how I can do that in GeneratePress?
Hi there,
GeneratePress has nothing to do with how you work with Javascript.
You need to add your own eventListener if you want to "do something" on a button click.
This article provides a good method for that:
This archived topic is closed to new replies.