Post Content Test
<span id="ase-transparent-header" style="display:none;"></span>
document.addEventListener('DOMContentLoaded', function() {
// This function only works for viewports greater than 500px
if (window.innerWidth > 500) {
var checkValue = document.getElementById('ase-transparent-header')?.textContent.trim();
document.querySelectorAll('.brxe-aqdpsn, .dropdown-text, .brx-submenu-toggle a').forEach(function(el) {
if (checkValue === 'True') {
el.style.color = '#fff'; // white text
} else {
el.style.color = '#000'; // black text
}
});
document.querySelectorAll('#brx-header').forEach(function(el) {
if (checkValue === 'True') {
el.style.background = 'linear-gradient(180deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.39) 47%, rgba(255, 255, 255, 0) 100%)';
el.style.backdropFilter = 'blur(20px)';
el.style.opacity = '1';
} else {
el.style.background = '#F3F7F6';
el.style.backdropFilter = 'none';
el.style.opacity = '1';
}
});
} else {
// For viewports 500px or less, set background to F3F7F6
document.querySelectorAll('#brx-header').forEach(function(el) {
el.style.background = '#F3F7F6';
el.style.backdropFilter = 'none';
el.style.opacity = '1';
});
}
});
Post Content Test