function updateHeaderHeight() {
// Get the height of #brx-header
const headerHeight = document.querySelector('#brx-header').offsetHeight;
// Store the height in the CSS custom property --header-height
document.documentElement.style.setProperty('--brxw-header-height', headerHeight + 'px');
}
// Execute the function as soon as the document is ready
document.addEventListener('DOMContentLoaded', function() {
updateHeaderHeight(); // Initial update of header height when the document is ready
// Update the header height on window resize and orientation change
window.addEventListener('resize', updateHeaderHeight);
window.addEventListener('orientationchange', updateHeaderHeight);
});
Quên mật khẩu
Quyền riêng tư của bạn
VINIRA sử dụng cookie cần thiết để website hoạt động và, khi bạn cho phép, cookie phân tích hoặc tiếp thị để cải thiện trải nghiệm và đo lường hiệu quả. Bạn có thể chấp nhận, từ chối hoặc tùy chỉnh lựa chọn bất cứ lúc nào.