Note those two class definitions in there, .start and .stop; those have to be your buttons. Right now you’ve got id and have renamed your buttons, so they’re not doing anything. If you code them like this:
Oh, and if you want your GIFs to play by default rather than be paused by default, just add
setTimeout(() => {
manual.start()
}, 2000)
right before </script> in that same bit. Due to peculiarities of the script, it needs a little wait (2 seconds in this case) before running the start command for everything to work.
Instead of making a whole new post, I’m trying to figure out how to make it so if you click a new link to a page, it just stays on this page and the content inside the book changes. I know it has something to do with anchors? But I want the content hidden until the link is clicked, not just have it jump to a part of the page. I hope that makes sense, maybe you can help me with it! Thank you!
The JS free way to do it is with an iframe, so a page within the page.
I am not great at JavaScript, so I think there may be some people here who are better equipped to help you get into the weeds with that one. I do know that cfb-exe has something like what you’re after (and the script is here). You could save the page and the script, open it up and reverse engineer it for your own application - that’s how I often approach the dread JavaScript anyway.
It looks like you got this working with your start/stop buttons. I just wanted to add that I used this method which uses the prefer-reduced-motion query to stop animated gifs if a user’s browser has that setting turned on.