Is there a way to create a button that changes a div's position with a 2-second transition on the first click and then returns it back on the second click?
I tried implementing this code, but unfortunately, it doesn't bring the div back.
var d = document.getElementById("button");
d.addEventListener('click', function() {
d.className = d.className + " move";
});