Include jquery in kirby

Hi, I’m trying to use some Jquery in a page but it doesn’t seem to be recognized.
In the header I have

<script src="content/assets/js/jquery-3.3.1.js"></script>

and in the footer I have


  $(".tabs-list li a").click(function(e){

  $(".tabs-list li").click(function(){
     var tabid = $(this).find("a").attr("href");
     $(".tabs-list li,.tabs").removeClass("active");   // removing active class from tab

     $(".tab").hide();   // hiding open tab
     $(tabid).show();    // show tab
     $(this).addClass("active"); //  adding active class to clicked tab



But it’s not being used in the page.

Thanks for any help

Is your script really located in the content folder? I suggest you use the js() and css() helpers to include your scripts and stylesheets, see docs:

Yes all’s located as I said.
Not to clear about Helpers, could you give me an example of how I’d use them in my case


Why is the file located in the content folder? It’s possible but that somehow doesn’t really make that much sense.

<?= js('content/assets/js/jquery-3.3.1.js') ?>

I thought that was the recommended setup.
Where’s the recommended location for these files?

Usually, we use an assets folder within the root folder, i.e. next to the index.php. However, the name and location is up to you, only I wouldn’t put the assets into the content folder. All folders inside content become pages…

See the Startkit for an example and the docs:

Thanks very much, moved the assets folder as suggested and Ola! all works as expected.