For better maintainability and clean code it's best to not mix and match HTML and JavaScript.
Hence I'd recommend to move the JavaScript code into a separate file and Node.addEventsListener('eventtype',callback) to a Node (for example var Node = document.querySelector('#sectionFoo');.
For better maintainability and clean code it's best to not mix and match HTML and JavaScript. Hence I'd recommend to move the JavaScript code into a separate file and
Node.addEventsListener('eventtype',callback)
to a Node (for examplevar Node = document.querySelector('#sectionFoo');
.