var menu = document.getElementById('menu') menu.onmousedown = myDown; menu.onmouseup = myUp; menu.onmousemove = myMove;