I have several js files in my host/public/js folder. In my html I have a list with several links, representing the js files.
What I am trying to achieve is, when a link is clicked (e.g. <a href="">file1.js</a>
) the file1.js (referenced in <head> <script src="/js/file1.js" type="text/javascript"></script> </head>
in my html file) should be used for displaying maps created using leaflet (a JavaScript library for interactive maps).
Is there a way to create this "javascript file selection" tool using PHP, Javascript, twig, or jquery?