# Include jquery in kirby

**URL:** <https://forum.getkirby.com/t/include-jquery-in-kirby/15527>\
**Category:** Questions\
**Tags:** v3\
**Created:** [September 5, 2019, 8:52am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527 "2019-09-05T08:52:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdavid](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mdavid](https://forum.getkirby.com/u/mdavid)\
**Post date:** [September 5, 2019, 8:52am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/1 "2019-09-05T08:52:18Z")

</div>

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

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

```

and in the footer I have

```auto
<script>
 $(document).ready(function(){

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

  $(".tabs-list li").click(function(){
     var tabid = $(this).find("a").attr("href");
     $(".tabs-list li,.tabs div.tab").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

  });

});
</script>

```

But it’s not being used in the page.

Thanks for any help

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 5, 2019, 9:04am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/2 "2019-09-05T09:04:02Z")

</div>

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: [https://getkirby.com/docs/reference/templates/helpers](https://getkirby.com/docs/reference/templates/helpers)

---

<div class="post-metadata">

**Author:** ![mdavid](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mdavid](https://forum.getkirby.com/u/mdavid)\
**Post date:** [September 5, 2019, 9:38am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/3 "2019-09-05T09:38:04Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 5, 2019, 9:41am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/4 "2019-09-05T09:41:55Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![mdavid](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mdavid](https://forum.getkirby.com/u/mdavid)\
**Post date:** [September 5, 2019, 10:12am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/5 "2019-09-05T10:12:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 5, 2019, 10:14am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/6 "2019-09-05T10:14:25Z")

</div>

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: [https://getkirby.com/docs/guide/tour#kirby-s-folder-structure](https://getkirby.com/docs/guide/tour#kirby-s-folder-structure)

---

<div class="post-metadata">

**Author:** ![mdavid](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mdavid](https://forum.getkirby.com/u/mdavid)\
**Post date:** [September 5, 2019, 10:51am UTC](https://forum.getkirby.com/t/include-jquery-in-kirby/15527/7 "2019-09-05T10:51:54Z")

</div>

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