Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div id="box">
      click Me  
    </div>
</body>
</html>
 
(function (){
'use strict';
    function move (){
        const x = Math.random() * 90;
        const y = Math.random() * 90;
        box.style.left = x + '%';
        box.style.top = y + '%' ;
    }
box.addEventListener('mousemove',move);
})();
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers