Take the Survey
Find Out How Your Company Ranks
Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page. Here is some intro text for the survey page.
[gravityform id=”1″ title=”false” description=”false”]
{
horizontalItems.push({
element: el,
speed: 0.2,
direction: el.classList.contains('parallax-left') ? 'left' : 'right'
});
});
// Update vertical parallax positions
function updateVerticalParallax() {
verticalItems.forEach(item => {
const rect = item.container.getBoundingClientRect();
const offset = rect.top * item.speed;
item.layer.style.transform = `translateY(${offset}px)`;
});
}
// Update horizontal parallax positions for individual elements
function updateHorizontalParallax() {
horizontalItems.forEach(item => {
const rect = item.element.getBoundingClientRect();
if (rect.bottom > 0 && rect.top < window.innerHeight) {
const offset = rect.top * item.speed;
if (item.direction === 'left') {
item.element.style.transform = `translateX(${-offset}px)`;
} else {
item.element.style.transform = `translateX(${offset}px)`;
}
}
});
}
// Combined parallax update function
function updateParallax() {
updateVerticalParallax();
updateHorizontalParallax();
}
// Recalculate vertical parallax sizes on window resize
function recalcVerticalSizes() {
verticalItems.forEach(item => {
const containerHeight = item.container.offsetHeight;
const maxOffset = window.innerHeight * item.speed;
const requiredHeight = containerHeight + 2 * maxOffset;
item.layer.style.height = requiredHeight + 'px';
item.layer.style.top = -maxOffset + 'px';
});
updateParallax();
}