Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Example</title>
  <style>
    div {
      border: 1px solid #aaa;
      background-color: #eee;
      height: 4em;
      font-family: sans-serif;
      text-align: center;
    }
  </style>
</head>
<body>
  <div class="top">top div</div>
  <div class="middle">middle div</div>
  <div class="bottom">bottom div</div>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"></script>
<script>
    $(document).on("touchstart", function(e) {
      if (!e.originalEvent.targetTouches) {
        snippet.log(e.type + ": No e.originalEvent.targetTouches");
      }
      else if (!e.originalEvent.targetTouches[0]) {
        snippet.log(e.type + ": No e.originalEvent.targetTouches[0]");
      }
      else if (!e.originalEvent.targetTouches[0].target) {
        snippet.log(e.type + ": No e.originalEvent.targetTouches[0].target");
      }
      else {
        snippet.log(e.type + ": e.originalEvent.targetTouches[0].target.className: " + e.originalEvent.targetTouches[0].target.className);
      }
      snippet.log(e.type + ": e.target.className: " + e.target.className);
    });
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
tjcrowderpro
0viewers