Watch the title element size for change

This commit is contained in:
Alex Ling 2020-04-01 06:13:03 +00:00
parent aa09f3a86f
commit 58e96cd4fe

View File

@ -2,6 +2,7 @@ const truncate = () => {
$('.acard .uk-card-title').each((i, e) => {
$(e).dotdotdot({
truncate: 'letter',
watch: true,
callback: (truncated) => {
if (truncated) {
$(e).attr('uk-tooltip', $(e).attr('data-title'));
@ -14,6 +15,4 @@ const truncate = () => {
});
};
$(() => {
truncate();
});