I’m working on the Chore Door project, and I can’t seem to get the door to open! The image of the door is there, but the function doesn’t seem to be working. I broke down and started watching the walk through, but I’m still not sure what I’m doing wrong.
Here is what I have in each file:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Chore Door!</title>
<link href="./style.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet" type="text/css">
</head>
<body>
<div class="door-row">
<img id="door1" src="https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg">
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>
JAVASCRIPT
let doorImage1 = document.getElementByID('door1');
const botDoorPath = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/robot.svg";
door1.onclick = () => {
doorImage1.src=botDoorPath;
}