I want to hide certain elements based on the zoom level of the page, which we’ve implemented for accessibility reasons. I figured the best way to do so would be to just pass the zoom level variable to the snippet where I can just use php to only show the zoom out button if someone has already zoomed in. However I couldn’t really find out how to pass a Javascript variable without clunky workarounds. I’m not exactly sure if I should use the js() method since I only want to pass a single variable? I have the classic main.js file under /assets and the snippets under /snippets. The button itself is on the navbar which is a nested snippet in the header.
Thanks!