The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Help w/ Running Multiple Javascripts Reply To: Help w/ Running Multiple Javascripts


We only really need to to see a reduced test case but it doesn’t look like your JavaScript is in the right place for this script. Above the closing body is expected, and what the slider tutorial indicates. In this case, the DOM (and elements referenced by the script) need to exist before the JS is ‘read’ by the browser, so that it can interpret them in context. If you need to put the script first, try putting it inside an event listener such as DOMContentLoaded.