mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
Watch the title element size for change
This commit is contained in:
+1
-2
@@ -2,6 +2,7 @@ const truncate = () => {
|
|||||||
$('.acard .uk-card-title').each((i, e) => {
|
$('.acard .uk-card-title').each((i, e) => {
|
||||||
$(e).dotdotdot({
|
$(e).dotdotdot({
|
||||||
truncate: 'letter',
|
truncate: 'letter',
|
||||||
|
watch: true,
|
||||||
callback: (truncated) => {
|
callback: (truncated) => {
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
$(e).attr('uk-tooltip', $(e).attr('data-title'));
|
$(e).attr('uk-tooltip', $(e).attr('data-title'));
|
||||||
@@ -14,6 +15,4 @@ const truncate = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(() => {
|
|
||||||
truncate();
|
truncate();
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user