Here's a conundrum for you. I have a box that I want to move 200px to the left when clicked, but I'm struggling to make it work. Can someone please lend a hand and point out where I'm going wrong?
<style>
.box {
width: 200px;
height: 200px;
background-color: red;
}
.playing {
transform: translate(200px);
}
</style>
<title>Document</title>
</head>
<body>
<div class="box"></div>
<script>
const move = document.getElementsByClassName("box");
move.addEventListener("click", _move);
function _move(e) {
move.classList.add("playing");
}