.text-ellipsis {
text-overflow:ellipsis;
white-space:nowrap;
overflow:hidden;
}
.multiple-text-ellipsis {
display: -webkit-box;
overflow : hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
function ellipsis(element, contentBox) {
$(element).each(function(i){
var divH = $(this).height();
var $content = $(contentBox, $(this)).eq(0);
while ($content.outerHeight() > divH) {
$content.text($content.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "..."));
};
});
}