Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
  
    <div id="container">
       Container
       <div id="box">
          Box
          <p>Paragraph</p>
       </div>
    </div>
  
</body>
</html>
 
$(function(){
  var allIDs = [];
  
  $('div').on('mousedown', function( ev ){
    allIDs.push( this.id );
    console.log( "All IDs: " + allIDs );
    console.log( "Ev. bubbled Selector ID: " + this.id );
    console.log( "Target ID: " + ev.target.id );
  }).on('mouseup', function(){
    allIDs = []; // Reset array
  });
    
}); 
Output 300px

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

Dismiss x
public
Bin info
roXonpro
0viewers