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>JS Bin</title>
</head>
<body>
  <h1 id="tehHeading">This is awesome</h1>
  
  <div id="tehContent" tabindex="-1">OMG Teh content</div>
</body>
</html>
 
*[tabindex="-1"]:focus{
  outline:none;
}
 
var tehH1 = document.getElementById('tehHeading'),
    tehContent = document.getElementById('tehContent');
tehH1.addEventListener('click', function(){
    tehContent.focus();
    console.log('tehContent was focused!');
});
Output

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

Dismiss x
public
Bin info
karlgrovespro
0viewers