Fixed Width
mkeuschn opened this issue · 0 comments
mkeuschn commented
Hi,
I need fixed width because the surrounding container is responsive (table), and sometimes empty.
I have some additions to your code.
else if (!isNaN(width)) {
// If there is no text do nothing
if (str !== '') {
bite_size = length - width;
// If the text is to short do nothing
if (bite_size > 0) {
bite = utils.eatStr(str, side, bite_size, fill);
this.html(bite);
if (settings.tooltip) {
this.attr('title', str);
}
}
}
}
regards,
Marko