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,730 chars
const bgColorRegexTS = /rgba((d+), (d+), (d+), (d*.?d*))/;
function isTransparentTS(elem) {
const bg = elem.css('background-color');
if (typeof bg !== "string" || !bg.startsWith('rgba(')) return false;
const matchState = bg.match(bgColorRegexTS);
if (!matchState || matchState.length !== 5) return false;
const alpha = parseFloat(matchState[4], 10);
if (!(alpha >= 0 && alpha < 1)) return false;
return true;
}

function iterateLeftpads(cb) {
const containersTS = $("[class^='siteWrap'],[class*=' siteWrap']");
for (let i = 0; i < containersTS.length; i++) {
const containerTS = containersTS[i];
// Skip the body container and anything with data-skip-leftpad
if (
containerTS.id !== "bodyContainerTS" &&
containerTS.getAttribute('data-skip-leftpad') === null
) {
cb(containerTS);
}
}
}

function iterateRightpads(cb) {
const containersTS = $("[class^='siteWrap'],[class*=' siteWrap']");
for (let i = 0; i < containersTS.length; i++) {
const containerTS = containersTS[i];
// Skip the body container and anything with data-skip-rightpad
if (
containerTS.id !== "bodyContainerTS" &&
containerTS.getAttribute('data-skip-rightpad') === null
) {
cb(containerTS);
}
}
}

const anchor = $("#divToolbars");

// Outer banner padding (push banner down)
const outerSizingTS = $("#bannerContainerTS");
// Inner banner padding (push banner content down) - Transparent header OR on attaching headers
const innerSizingTS = $("#bannerSizingTS");
const bodyContainerTS = $("#bodyContainerTS");
const headerContainerTS = $("#headerContainerTS");
const forceUnfixClassTS = "forceUnfixTS";

const fixedTopTS = $(".fixedTopTS");
const fixedBottomTS = $(".fixedBottomTS");
const fixedLeftTS = $(".fixedLeftTS");
const fixedRightTS = $(".fixedRightTS");