app

// select the item element const item = document.querySelector(‘.item’); // attach the dragstart event handler item.addEventListener(‘dragstart’, dragStart); // handle the dragstart function dragStart(e) { e.dataTransfer.setData(‘text/plain’, e.target.id); setTimeout(() => { e.target.classList.add(‘hide’); }, 0); } const boxes = document.querySelectorAll(‘.box’); boxes.forEach(box => {…Continue reading