fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

Clarification needed: how can I run spin.js options file detailed on website? #393

Open slferris opened 1 month ago

slferris commented 1 month ago

The instructions for spin.js under "Usage" on your website tell me to "Run the following code when the document has loaded:". I'm still new to javascript, so how and where do I do that in my project?

I tried placing the options code for the spinner from your website in my html, but it didn't work there. I also attempted to use a module with a script tag, but that doesn't work either. In both cases VS didn't like the "import {Spinner} from 'spin.js';" statement in the first line. I thought I needed to change 'spin.js' to './spin,js', but that didn't work either.