|
|
eleFixed.classList.add('sticky-bottom');
eleStatic.parentNode.insertBefore(eleFixed, eleStatic);
eleFixed.style.width = eleStatic.getBoundingClientRect().width + 'px';
eleStatic.style.visibility = 'hidden';
window.addEventListener('scroll', function() {
|