Static jquire accesss in luminus

I am working on a luminus project and I want to add script file with jquery functions. The file is called scripts.js and it is in the resources/public/js folder. I am trying to load it with

{% src “/assets/js/scripts.js” %}

but with no succes. How do I load static js files in a luminus project?

and another question: if I have a jquery function like this in my scripts file:

function k3() { $(“#alla”).click(function() { alert(“alla”)})}

why must I reload it every time I have cliked the id=“alla” button in order to make it work again? why is it not constantly listening to a click event?

ok, I think I understand how this works.
to load the sscripts.js file, just write:

 <script src="/js/scripts.js"></script>

Every time I click on the button the whole page is reloaded and subsequently the jquery function is gone. All my functions reside in a scripts.js file on the server side. The solution is to have the jquery function on the page that is being reloaded.

I hope this is heplfull for others.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.