Integrate JS Animation

Hi,

I’d like to add this to a site as a background of the hero image:


See the Pen
Magnetic Field
by Jake Weary (@thepheer)
on CodePen.

I’ve successfully used other JS animations such as particle.js but not been able to make this one work… Does anyone know how best to make it work?

You’ll need to do some digging through the JS dependencies-

Thanks @memetican. Any idea how that would look in webflow custom code?

You’ll learn the most about how codepen establishes these scripts by looking at the source in devtools.

If I add some HTML content to the pen, it appears codepen generates the scripts at the bottom of the <body>, just before your pen’s custom code.