Using jQuery's on() Function

HTML

<table id="customerTable" style="width:300px;">
    <thead>
        <tr style="background:#efefef;">
            <td>Name</td>
            <td>City</td>
        </tr>
    </thead>
    <tbody>
        <tr class="data">
            <td>John Smith</td>
            <td>Phoenix</td>
        </tr>
        <tr>
            <td>Jane Smith</td>
            <td>Phoenix</td>
        </tr>
        <tr>
            <td>Michelle Dantes</td>
            <td>San Francisco</td>
        </tr>
    </tbody>
</table>

JavaScript

$(function() {
    $('#customerTable tbody').on('click', 'tr.data', function() {
        alert('Clicked a Row');
    });
});