mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
Only show tooltips for truncated titles
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
const truncate = () => {
|
||||
$('.acard .uk-card-title').each((i, e) => {
|
||||
$(e).dotdotdot({
|
||||
truncate: 'letter'
|
||||
truncate: 'letter',
|
||||
callback: (truncated) => {
|
||||
if (truncated) {
|
||||
$(e).attr('uk-tooltip', $(e).attr('data-title'));
|
||||
}
|
||||
else {
|
||||
$(e).removeAttr('uk-tooltip');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user