- The old versions self-initialized. You have to initialize them now, which means you can concatenate them all into a single file and only call them when needed. It also means you can reinitialize them if the DOM gets modified.
- You can pass in your own options and callbacks into the scripts via the
init()function, which gives you more control.
- On scripts where it makes sense (Smooth Scroll, for example), you can set overrides on individual elements.
- Key functions in the scripts can now be used in your own scripts, which allows you to extend and build upon the scripts without messing with the core code.
I’ll be writing up a tutorial on the approach soon, but in the meantime, check out the full set of scripts on GitHub.