I am using Moodle 3.4.1
I'm new to JS and AJAX, but using countless precious tutorials I managed to write a script made of two files, it's reading throug multiple json files in specified folders and after selecting an item from dropdown list it inserts formatted data into <div>.
Everything is working smoothly, but I want the page to look like it belongs to our site, so I tried to insert header and footer, and it just stops working. I tried to understand how to make it work the same way, but in Moodle, but I just don't get it.
I used jQuery for this, if it helps.