Menu icon Foundation
Problem with scrollmagic external js

Hi,

Iḿ trying to integrate scrollmagic with a cli installation of Foundation Sites. I defined the import of js in the config.yml file, andadded this in the .babelrc file:

{
	"presets": ["es2015"],
	"ignore": [
		"src/assets/js/scrollmagic/jquery.ScrollMagic.js",
		"src/assets/js/scrollmagic/ScrollMagic.js",
		"src/assets/js/scrollmagic/animation.gsap.min.js",
		"src/assets/js/scrollmagic/debug.addIndicators.min.js"
	],
  "compact": false
}

But when I try foundation watch, there's an error (undefined root variable). I don't know how to solve this situation, and I didn't find a good documentation on what is the right way to integrate external js into my project. Any help?

scrollmagicthird party javascript

Hi,

Iḿ trying to integrate scrollmagic with a cli installation of Foundation Sites. I defined the import of js in the config.yml file, andadded this in the .babelrc file:

{
	"presets": ["es2015"],
	"ignore": [
		"src/assets/js/scrollmagic/jquery.ScrollMagic.js",
		"src/assets/js/scrollmagic/ScrollMagic.js",
		"src/assets/js/scrollmagic/animation.gsap.min.js",
		"src/assets/js/scrollmagic/debug.addIndicators.min.js"
	],
  "compact": false
}

But when I try foundation watch, there's an error (undefined root variable). I don't know how to solve this situation, and I didn't find a good documentation on what is the right way to integrate external js into my project. Any help?

Rafi Benkual 4 months ago

That seems like it - have you seen this thread where that solution was posted? http://foundation.zurb.com/forum/posts/48046-adding-scrollmagic-to-configyml-error

Rabi Hernandez 4 months ago

Yes, I saw that post. That appears that I had an error in the syntax, all is working now. Thanks.