Check out this fiddle I made: http://jsfiddle.net/mupersan82/JYuSY/
This snippet handles multiline ellipsis:
$(function() {
var ellipsisText = $('.multilineEllipseText');
var textContainer = $('.incidentCellBottomRight').height();
while ($(ellipsisText).outerHeight(true) > textContainer) {
$(ellipsisText).text(function(index, text) {
return text.replace(/\W*\s(\S)*$/, '...');
});
}
});
The original function can be found here: Cross browsers mult-lines text overflow with ellipsis appended within a width&height fixed div?
Although the function works for multiline content, it doesn't let the text reach the edges. For single-line content, the ellipsis appears after just one word.
Ideally, text should fill up to the max height of its parent div, which is set at 100px.