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,781 chars
if (topPosition === 'fixed' || topPosition === 'absolute') {
// Bump the banner content down
if (isTransparentTS(fixedTopTS)) {
innerSizingTS.css('padding-top', initialTopTS + fixedTopTS.outerHeight() - 1);
outerSizingTS.css('padding-top', '');

try {
window.Pages.onResizeHandlersExecute();
} catch (e) { }
} else {
outerSizingTS.css('padding-top', fixedTopTS.outerHeight() - 1);
innerSizingTS.css('padding-top', '');
}
} else {
innerSizingTS.css('padding-top', '');
outerSizingTS.css('padding-top', '');
}
})();

// Fixed bottom script
(function () {
if (!fixedBottomTS || fixedBottomTS.length === 0) return;

// If the widget has gone narrow, force unfix
if (editing || fixedBottomTS.outerHeight() > 200) {
fixedBottomTS[0].classList.add(forceUnfixClassTS);
} else {
fixedBottomTS[0].classList.remove(forceUnfixClassTS);
}

if (fixedBottomTS.css('position') === 'fixed') {
bodyContainerTS.css('padding-bottom', fixedBottomTS.outerHeight());
} else {
bodyContainerTS.css('padding-bottom', '');
}
})();

// Fixed left script
(function () {
if (!fixedLeftTS || fixedLeftTS.length === 0) return;

if (editing) {
fixedLeftTS[0].classList.add(forceUnfixClassTS);
} else {
fixedLeftTS[0].classList.remove(forceUnfixClassTS);
}

if (fixedLeftTS.css('position') === 'fixed') {
const anchorHeight = anchor.outerHeight() - 1;
fixedLeftTS.css('top', anchorHeight);
const leftBoundingTS = fixedLeftTS[0].getBoundingClientRect();
iterateLeftpads(function (containerTS) {
const containerBoundingTS = containerTS.getBoundingClientRect();
if (containerBoundingTS.left <= leftBoundingTS.right) {
$(containerTS).css('padding-left', leftBoundingTS.width + 16);
}
});
} else {
fixedLeftTS.css('top', '');
iterateLeftpads(function (containerTS) {
$(containerTS).css('padding-left', '');
});
}
})();
}