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-2.1.0.min.js"></script>
<script src="_so/js?//stackoverflow.com/questions/24196128/how-do-i-get-an-onclick-to-be-reversed-on-a-second-click" id="so"></script>
<meta charset="utf-8">
<title>Demo by Roko C.B.</title>
</head>
<body>
 
  <h1>Click on table cells</h1>
  
  <table id="myTable">
    <tr><td>a1</td><td>a2</td><td>a3</td></tr>
    <tr><td>b1</td><td>b2</td><td>b3</td></tr>
    <tr><td>c1</td><td>c2</td><td>c3</td></tr>
  </table>
  
  
  
</body>
</html>
Output

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

Dismiss x
public
Bin info
roXonpro
0viewers