Home › Forums › JavaScript › Help w/ Running Multiple Javascripts › Reply To: Help w/ Running Multiple Javascripts
October 20, 2019 at 10:07 pm
#297551
Participant
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.