Particles.js Help

I know there are many tutorials and topics, but I just can’t get this to work.

I’ve put the code in the proper spots…but I either get nothing…or I show errors when looking at my source…I have been trying to do this for nearly 3 hours.

Any ideas?

I can see in the dev tools console you have an error:

If you have followed whichever instructions you had to the absolute letter, then there is likely an issue with someone else’s code. Having said this, you seem to have included this script 4 times. 3 of them are commented out, so shouldn’t be causing an issue but still, you might want to remove those.

If you didn’t put these here and comment them out yourself, there could be some other weird things going on.

If you reply with a link to the instructions you were following I may be able to help you further. I’m not familiar enough with what you are trying to achieve to be able to help much more than this right now.


I think I found what you may have been following?

If so, I made a test site here and got the animation working.

I also get this error:

Which leads me to believe that there may be an issue with their particles.js library. The animation does still work for me at least. It’s possible that you have your scripts loading in the wrong place or not being executed at the right time on page load.

Feel free to share an edit link to your site and I’ll see if I can work out what’s going on.


Yes I was able to fix it with your post, I did some research. I was setting “particles-js” CLASS but not ID.
Haha…oh the pains of being a newbie.

However, I couldn’t figure out what the error is.