# Problem adding FancyBox js

**URL:** https://discourse.roots.io/t/problem-adding-fancybox-js/2279
**Category:** uncategorized
**Created:** 2014-09-18T16:44:33Z
**Posts:** 7

## Post 1 by @Wilmoth77 — 2014-09-18T16:44:34Z

I’m using the latest version of Roots and trying to add FancyBox. This worked fine on my last Roots site, but it was using the previous Grunt file.

I placed the FancyBox folder into the js/plugins dir, added the function to \_main.js and then added the line ‘assets/js/plugins/fancybox/js/\*.js’, to the jsFileList in grunt.js.

When I load the page I get an invalid token error.

![](https://discourse.roots.io/uploads/default/1316/5be7b5b84d6f0d3e.png)

I’m at a loss, any help would be greatly appreciated?

---

## Post 2 by @ben — 2014-09-18T18:01:02Z

Since you added Fancybox to `assets/js/plugins` instead of loading it with Bower, you do not add it to `jsFileList`. `jsFileList` already has `'assets/js/plugins/*.js'`

You should be installing Fancybox with Bower, and then adding the path to the unminified JS in the `assets/vendor/fancybox/` directory to `jsFileList`

---

## Post 3 by @Wilmoth77 — 2014-09-18T18:45:10Z

Ah, ok. Thanks Ben!  
Had a tight deadline and didn’t get a chance to familiarize myself with Bower.

It’s working now, thanks again!

---

## Post 4 by @popsy — 2014-12-18T17:52:16Z

Well, I loaded fancyBox using bower and I added `'assets/vendor/fancybox/source/jquery.fancybox.js'` to `jsFileList`. Cool! But what about CSS (`jquery.fancybox.css` file) and images?

---

## Post 5 by @JulienMelissas — 2014-12-18T18:03:57Z

@popsy: This is going to be solved in the upcoming release of Roots… until then…

Check out these instructions I gave on loading bxSlider: [How to adding a Responsive jQuery Slider to Roots](http://discourse.roots.io/t/how-to-adding-a-responsive-jquery-slider-to-roots/1295/3?u=julienmelissas)

---

## Post 6 by @popsy — 2014-12-18T18:56:21Z

Mh, thanks. What will do the upcoming release? And when it’ll be released?

---

## Post 7 by @JulienMelissas — 2014-12-22T02:48:51Z

You ran read more about it here: [https://github.com/roots/roots/pull/1138](https://github.com/roots/roots/pull/1138), as of now there is no exact ETA for the release.
