# Plugin doesn't load

**URL:** <https://forum.getkirby.com/t/plugin-doesnt-load/6876>\
**Category:** Questions\
**Tags:** v2\
**Created:** [March 7, 2017, 6:54pm UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876 "2017-03-07T18:54:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toboggan](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@Toboggan](https://forum.getkirby.com/u/Toboggan)\
**Post date:** [March 7, 2017, 6:54pm UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/1 "2017-03-07T18:54:10Z")

</div>

I’ve been trying to add a responsive menu ([Responsive Nav](https://github.com/viljamis/responsive-nav.js) ) to my website, but fail to make it work.

My browser is notifying of following errors:

```
[Error] Failed to load resource: the server responded with a status of 404 (Not Found)
https://www.mysite.com/kirby/responsive-nav.js
[Error] Failed to load resource: the server responded with a status of 404 (Not Found)
https://www.mysite.com/kirby/responsive-nav.css
ReferenceError: Can't find variable: responsiveNav

```

I have followed the usage instructions presented in the plugin’s GitHub-page and I have tried different ways to place the assets including the one suggested in the Kirby documentation ([https://getkirby.com/docs/developer-guide/plugins/assets](https://getkirby.com/docs/developer-guide/plugins/assets)):

```
/site/plugins/myplugin/assets/css/myplugin.css
/site/plugins/myplugin/assets/js/myplugin.js

```

Can anyone point out where the problem could be? Thank you already in advance for any help or advice.

---

<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:** [March 7, 2017, 7:44pm UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/2 "2017-03-07T19:44:22Z")

</div>

Plugin assets is not the right place, it’s only for Kirby plugins, not for Javascript stuff. You should put your files into `assets/js` and then include the link tag for the js and css files between the `<head></head>` tags in the header snippet.

For easier referencing, you can use the[`css()`](https://getkirby.com/docs/cheatsheet/helpers/css) and [`js()`](https://getkirby.com/docs/cheatsheet/helpers/js) helpers.

For example, if the file responsive-nav.min.js is located in `/assets/js/responsive-nav/responsive-nav.min.js`

```auto
<?= js('assets/js/responsive-nav/responsive-nav.min.js') ?>

```

And for the css:

```auto
<?= css('assets/js/responsive-nav/responsive-nav.css') ?>

```

---

<div class="post-metadata">

**Author:** ![Svnt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/svnt/32/620_2.png) [@Svnt](https://forum.getkirby.com/u/Svnt)\
**Post date:** [March 7, 2017, 10:28pm UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/3 "2017-03-07T22:28:28Z")

</div>

from: [https://getkirby.com/docs/developer-guide/plugins/assets](https://getkirby.com/docs/developer-guide/plugins/assets)

> All plugin assets must go into an assets folder.

> `/site/plugins/{pluginName}/assets`

maybe this don’t work:

> As long as you store your assets in the assets folder, your assets are publicly available at the following URL:

> `http://{domain}/assets/plugins/{pluginName}/{optionalSubfolder}/{filename}`

or maybe there are some overriding files?

> Your plugin users can customize your stylesheets, images, or any other asset, by copying the orginal from the plugin’s asset folder to the actual asset location /assets/plugins/{pluginName} as pointed out by the URL. **The server will then pick the custom file instead of running the route to the original plugin asset.**

---

<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:** [March 8, 2017, 6:45am UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/4 "2017-03-08T06:45:24Z")

</div>

@Svnt: Responsive Nav is some JavaScript, not a Kirby plugin. It does not make sense to put it in the plugins folder at all.

---

<div class="post-metadata">

**Author:** ![Toboggan](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@Toboggan](https://forum.getkirby.com/u/Toboggan)\
**Post date:** [March 8, 2017, 7:54am UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/5 "2017-03-08T07:54:48Z")

</div>

Thank you `texnixe`, now it works!

Maybe this answer should have been obvious, but for some reason it wasn’t. 😌

Anyway this solved the problem, thanks once again! 😀 👍

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:52pm UTC](https://forum.getkirby.com/t/plugin-doesnt-load/6876/6 "2025-02-06T16:52:32Z")

</div>


