Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>dblclick test</title>
</head>
<body>
  <div class="auto"></div>
  <div class="manipulation"></div>
  <div class="none"></div>
  <br />
  <button>Create scrollbars</button>
</body>
</html>
 
document.body.addEventListener('dblclick', function (event) {
  if (event.target.tagName === 'DIV')
    event.target.style.backgroundColor = 'green';
});
document.querySelector('button').addEventListener('click', function (event) {
  document.body.style.minWidth = '150vw';
  document.body.style.minHeight = '150vh';
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
lpd-aupro
0viewers