The below works if running a script, but is there a way to run it via a button?
You can trigger JavaScript from InDesign using a new Hyperlink that you can apply to a shape as your button. Here's more information:
You'll need in5 in order to try the approach from the article. in5 exports content as HTML5 but not as a fixed layout epub:
You can download the in5 trial here:
When you export with in5, add the JavaScript in the Resources section of the in5 export dialog.