get a column click in dataTables plugin instead of row

by Akram kamal

HTML

<table>
    <tr>
        <td>1.1</td>
        <td>1.2</td>
        <td>1.3</td>
    </tr>
    <tr>
        <td>2.1</td>
        <td>2.2</td>
        <td>2.3</td>
    </tr>
</table>

JavaScript

jQuery('td:first, td:last', 'table').on('click', function() {
    // do what you want
    alert(jQuery(this).html());
});