Skip to main content

Town of Amherst, Inspection Services, Residential Rental Property Registration & Inspection Program

Citation
Town of Amherst, Inspection Services, Residential Rental Property Registration & Inspection Program
Jurisdiction
Amherst (municipal)
Source
Official source

Related Parts of This Source

Full Text

1,634 chars
if (fixedRightTS.css('position') === 'fixed') {
const anchorHeight = anchor.outerHeight() - 1;
const headerHeight = headerContainerTS.outerHeight() - 1;
fixedRightTS.css('top', anchorHeight + headerHeight + 100);
const rightBoundingTS = fixedRightTS[0].getBoundingClientRect();
iterateRightpads(function (containerTS) {
const containerBoundingTS = containerTS.getBoundingClientRect();
if (containerBoundingTS.right >= rightBoundingTS.left) {
$(containerTS).css('padding-right', rightBoundingTS.width + 16);
}
});
} else {
fixedRightTS.css('top', '');
iterateRightpads(function (containerTS) {
$(containerTS).css('padding-right', '');
});
}
})();
}

function scrollAdjustmentTS() {
if (!fixedTopTS || fixedTopTS.length !== 1 || !topAttachTS || topAttachTS.length !== 1) return;
const topPosition = fixedTopTS.css('position');
if (topPosition === 'fixed' || topPosition === 'absolute') {
const anchorBounding = anchor[0].getBoundingClientRect();
const attachBounding = topAttachTS[0].getBoundingClientRect();
const scrollTop = $(window).scrollTop();

fixedTopTS.css('top', Math.max(anchorBounding.bottom - 1, attachBounding.bottom));
} else {
fixedTopTS.css('top', initialTopTS);
}
}

$(window).load(function () {
setTimeout(function () {
resizeAdjustmentTS();
}, 350);

$(window).scroll(function () {
scrollAdjustmentTS();
});

var adjustTimeoutTS;
$(window).resize(function () {
clearTimeout(adjustTimeoutTS);
adjustTimeoutTS = setTimeout(function () {
resizeAdjustmentTS();
}, 350);
});

$.when(window.Pages.angularToolbarComplete).done(function () {
resizeAdjustmentTS();
});
});

End Fixed Nav Adjustment

Move banner to outer wrap