So my questions are:
1. Does Javascript even work in WP-Themes?
2. Can I solve this Issue with PHP somehow?
3. How can I make it, that my function runs when the button is being clicked?
Thanks a lot for your help!
]]>Download the theme and heck the code for a free theme like https://www.ads-software.com/themes/twentyseventeen/ to see how the configuration is done for a mobile menu to open/collapse.
Use the theme files as a model/guide for setting up the proper JavaScript and PHP functions so your site can operate in a similar way.
]]>