1. Check the browser console for errors

Uncaught TypeError: Cannot read property 'something' of null - go to step 2

Uncaught ReferenceError: something is not defined - go to step 3

2. Check that your IDs in HTML match your IDs in JavaScript

HTML

<yourTag id="yourId"></yourTag>

JavaScript

var yourVariable = document.getElementById("yourId");

Check that both are camelCased

3. Check that your JavaScript variable names match

var yourVariable = document.getElementById("yourId");

yourVariable.addEventListener("click", yourFunction);

Check that both are camelCased

4. Check that you are adding an event listener

yourVariable.addEventListener("click", yourFunction);

function yourFunction() {
    // your code here
}

5. Pretend you are the computer and walk through your code

console.log your variables and check that they have the expected values