dotdotdot with Tables Demo

This fiddle shows how you can make jquery.dotdotdot work with tables. You have to put the content to be truncated within a div inside the table.

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/1.7.4/jquery.dotdotdot.min.js"></script>
<table>
    <tr>
        <th>Short Column</th>
        <th>Long Column</th>
    </tr>
    <tr>
        <td>Some info</td>
        <td id='long-column1'>This is a long column that should be truncated by the dotdotdot plugin.</td>
    </tr>
</table>

<table>
    <tr>
        <th>Short Column</th>
        <th>Long Column</th>
    </tr>
    <tr>
        <td>Some info</td>
        <td><div id='long-column2'><p>This is a long column that should be truncated by the dotdotdot plugin.</p></div></td>
    </tr>
</table>

CSS

#long-column1,
#long-column2 {
    width: 50px;
    height: 50px;
}

JavaScript

$(document).ready(function () {
    $('#long-column1').dotdotdot({});
    $('#long-column2').dotdotdot({});
});