Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="parent">
    <div class="child">
    </div>
  </div>
  
  <output></output>
</body>
</html>
 
var parent = document.querySelector('.parent'),
    op = document.querySelector('output');
parent.addEventListener('click',function(e) {
  op.innerHTML += e.target.className + '<br>';
  op.innerHTML += e.currentTarget.className + '<br>';
},false);
Output 300px

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

Dismiss x
public
Bin info
ImpressiveWebspro
0viewers