Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <table>
    <tbody>
      <tr><td class="hover">Hover here and hit the f9 key</td></tr>
    </tbody>
  </table>
</body>
</html>
 
var hovered = 0;
$(document).keydown(function(e) {
  console.log(hovered);
  if (e.keyCode === 120 && hovered) {
    console.log('td hovered and f9 pressed!');
  }
});
$('td.hover').hover(function() {
  hovered^= true; 
}, function() {
  hovered^= true; 
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers