Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <table>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
        <td>5</td>
    </tr>
    <tr>
        <td>6</td>
        <td>7</td>
        <td>8</td>
        <td>9</td>
        <td>10</td>
    </tr>
</table>
</body>
</html>
 
$('td').click(function(){
    $(this).nextAll("td").add($(this).closest('tr').next().find('td'))
       .slice(0, 4).addClass("selected");
});
Output

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

Dismiss x
public
Bin info
dystroypro
0viewers