Javascript toggle not working in Ionic View but works on Ionic Serve (desktop)

Can someone help me please?

When I use ionic serve, it all works very well… but when I upload it to my Ionic View app, the toggle isn’t working at all. Whatever I do, I can’t toggle the HTML. I know it’s not about the code, because otherwise it wouldn’t work on desktop…

Can someone help me please? I am just using a plain Javascript file (.js) and include it into my app.

Is there a specific way to do this for mobile?

are you using document.? in my experience that only works on desktop because it uses the index.html file when it is on the actual phone because ionic loads everything onto 1 page. But that’s not how ionic serve works. I don’t know exactly what you’re trying to do but event listeners and such work really well! best of luck