refactoring

This commit is contained in:
Burak Civan 2022-10-24 09:59:20 +03:00
parent 29f92dce18
commit 82dd65aca5

View File

@ -360,8 +360,9 @@ if (navigator.userAgent.search("Firefox") >= 0) {
//margue animation for truncated text //margue animation for truncated text
function marqueeAnimation(truncate) { function marqueeAnimation(truncate) {
if (truncate.closest('[data-disable-marquee]') !== null) { if (truncate.closest('[disable-marquee]') !== null) {
truncate.parentElement.classList.add('truncate'); truncate.parentElement.classList.add('truncate');
truncate.closest('[disable-marquee]').setAttribute('disable-marquee', 'data-disable-marquee');
return; return;
} }
// offsetwidth = width of the text, clientWidth = width of parent text (div) // offsetwidth = width of the text, clientWidth = width of parent text (div)