var headerInitOpacity = '0.3';
var headerStickyOpacity = '0.9';
var headerInitHeight = '80px';
var headerStickyHeight = '70px';
var headerHidingPoint = 40; // Scrolling point that triggers hiding the header (px)
var prevScrollpos = window.pageYOffset;
function handleScroll() {
var currentScrollPos = window.pageYOffset;
var navbar = document.getElementById("navbar");
// Determine the desired state of the navbar based on the current scroll position
var desiredState = getDesiredNavbarState(currentScrollPos, navbar.style.top);
if (desiredState.needsUpdate) {
// Temporarily remove the event listener to prevent multiple triggers
window.removeEventListener('scroll', handleScroll);
// Apply the desired navbar state
navbar.style.top = desiredState.top;
navbar.style.background = desiredState.background;
navbar.style.minHeight = desiredState.minHeight;
console.log(desiredState.logMessage); // Logging the action taken
// Re-add the event listener after a delay
setTimeout(function() {
window.addEventListener('scroll', handleScroll);
}, 50); // 100ms delay
}
prevScrollpos = currentScrollPos;
}
function getDesiredNavbarState(currentScrollPos, currentTop) {
if (prevScrollpos > currentScrollPos && currentScrollPos > headerHidingPoint) {
if (currentTop != "0px") {
return { needsUpdate: true, top: "0", background: "rgba(255, 255, 255, " + headerStickyOpacity + ")", minHeight: headerStickyHeight, logMessage: 'Sticking header' };
}
} else if (currentScrollPos <= headerHidingPoint) {
if (currentTop == "0px") {
return { needsUpdate: true, top: "0", background: "rgba(255, 255, 255, " + headerInitOpacity + ")", minHeight: headerInitHeight, logMessage: 'Top header' };
}
} else if (currentTop != "-100px") {
return { needsUpdate: true, top: "-100px", background: "", minHeight: "", logMessage: 'Hiding header' };
}
return { needsUpdate: false }; // No update needed
}
// Initially attach the scroll event listener
window.addEventListener('scroll', handleScroll);
Individual Tax Preparation
No More Taxes,
No More Cry
Battling taxes on your own can feel like an endless struggle. Sleepless nights over notice letters? Confused by out-of-nowhere tax debts? Lost in a sea of forms and rules? As your dedicated guru through the complex world of tax, XOA TAX is committed to transforming your tax troubles into peace of mind.
I highly recommend XOA TAX for their unmatched expertise in tax preparation and bookkeeping. Their bookkeeping services have organized my finances, so tax time is easy. XOA TAX provides prompt, reliable customer service year-round, taking the stress out of tax season by expertly handling my return. Their professionalism and attention to detail is impressive.
Ut Q.
El Monte, CA
Mar 28, 2023
XOA TAX is a great CPA firm which gets the job done right and fast. It made the entire process easy and stress free. He offers different options based on my needs saving my time so rest assure my tax season had been great.
Eric N.
Westminster, CA
Aug 27, 2023
I've used XOA TAX for taxes the past 2 years - they're awesome! Friendly, knowledgeable staff take the time to understand my complex tax situation with rental properties and multiple businesses. They ask tons of questions and always find extra deductions I miss, getting me max refunds. Before XOA, taxes were a pain. Now I look forward to my yearly appointment.