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="door-1" 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('door-1');
const botDoorPath = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/robot.svg";
doorImage1.oneClick = () => {
doorImage1.src = botDoorPath;
};