View on GitHub

API

The Crosshair table plugin accepts one parameter tables. Setup includes calling the crosshairs(tables) function passing in a comma-separated string of table elements or classes.

Code

<table class="table table-condensed">
    <tbody>
        <tr>
            <td>col 0</td>
            <td>col 1</td>
            <td>col 2</td>
            <td>col 3</td>
            <td>col 4</td>
            <td>col 5</td>
            <td>col 6</td>
            <td>col 7</td>
            <td>col 8</td>
            <td>col 9</td>
        </tr>
        ...
        <tr>
            <td>col 0</td>
            <td>col 1</td>
            <td>col 2</td>
            <td>col 3</td>
            <td>col 4</td>
            <td>col 5</td>
            <td>col 6</td>
            <td>col 7</td>
            <td>col 8</td>
            <td>col 9</td>
        </tr>
    </tbody>
</table>

<script>
    crosshairs('table');
</script>

Example

col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9
col 0 col 1 col 2 col 3 col 4 col 5 col 6 col 7 col 8 col 9