Chore Door won't open (Step 10)

Hello, I’ve been trying to figure out what I’m doing wrong with my code since the door won’t open! Can someone help?

index.html code

<!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>

script.js code

var doorImage1 = document.getElementById('door1');
var botDoorPath = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/robot.svg"
doorImage1.onclick = () => {doorImage1.src=botDoorPath}
1 Like

Did u get it working?

Yes it worked, I realized some syntax errors after posting. Thank you for your time!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.