' + '
' + text + '
' + '
'; document.querySelector('body').insertAdjacentHTML('beforeend', str); var currentError = document.querySelector('.t-menuwidgeticons__' + type + '-error'); setTimeout(function() { currentError.style.transition = 'opacity .4s, right .4s'; currentError.style.opacity = 1; currentError.style.right = '20px'; if (errorTopPos) currentError.style.top = errorTopPos + 'px'; }, 0); setTimeout(function () { t_menuwidgets_closeError(currentError); }, 3400); currentError.querySelector('.t-menuwidgeticons__error-close').addEventListener('click', function () { t_menuwidgets_closeError(currentError); }); } function t_menuwidgets_closeError(errorElement) { if (errorElement) { errorElement.style.opacity = 0; errorElement.style.right = '-350px'; setTimeout(function () { if (errorElement.parentNode !== null) { errorElement.parentNode.removeChild(errorElement); } }, 300); } }

Дизайн Человека / Human Design

Блог