Skip to main content

City of Northampton Housing Partnership, Legal Resources for Tenants and Landlords

Citation
City of Northampton Housing Partnership, Legal Resources for Tenants and Landlords
Source
Official source

Related Parts of This Source

Full Text

1,546 chars
// Outer banner padding (push banner down)
var outerSizingTS = $("#bannerContainerTS");
// Inner banner padding (push banner content down) - Transparent header OR on attaching headers
var innerSizingTS = $("#bannerSizingTS");

var forceUnfixClassTS = "forceUnfixTS";

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

var initialTopTS;
var topAttachTS;
if (fixedTopTS && fixedTopTS.length === 1) {
initialTopTS = getValueTS(fixedTopTS, 'top');
var attachment = fixedTopTS.attr('data-attach');
if (attachment) topAttachTS = $("#" + attachment);
if (!topAttachTS || topAttachTS.length !== 1) topAttachTS = undefined;
}

function resizeAdjustmentTS() {
var editing = isPageEditingTS();

// Fixed top script
(function () {
if (!fixedTopTS || fixedTopTS.length !== 1 || initialTopTS === undefined) return;

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

var topPosition = fixedTopTS.css('position');
if (topPosition === 'fixed') {
if (topAttachTS) {
scrollAdjustmentTS();
} else {
var anchorHeight = anchor.outerHeight() - 1;
fixedTopTS.css('top', anchorHeight + initialTopTS);
}
} else {
fixedTopTS.css('top', initialTopTS);
}

if (topPosition === 'fixed' || topPosition === 'absolute') {
// Bump the banner content down
if (isTransparentTS(fixedTopTS)) {
innerSizingTS.css('padding-top', initialTopTS + fixedTopTS.outerHeight());
outerSizingTS.css('padding-top', '');