init is the function you created after the
. It just says “run the function called ‘init’ when the DOM is ready”, you could as well write it like:
Which is the usual way it’s done. But there’s even a shortcut for this, just write:
// JS code here
Now, in order to tell you why your slideshow isn’t working we need to see your HTML, too. What does the JS error console say?