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,701 chars
if (fixedRightTS.css('position') === 'fixed') {
var anchorHeight = anchor.outerHeight() - 1;
fixedRightTS.css('top', anchorHeight);
var rightBoundingTS = fixedRightTS[0].getBoundingClientRect();
iterateRightpads(function (containerTS) {
var 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;
var topPosition = fixedTopTS.css('position');
if (topPosition === 'fixed' || topPosition === 'absolute') {
var anchorBounding = anchor[0].getBoundingClientRect();
var attachBounding = topAttachTS[0].getBoundingClientRect();
var scrollTop = $(window).scrollTop();

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

$(window).load(function () {
setTimeout(function () {
try {
resizeAdjustmentTS();
} catch (e) {
console.error(e);
}
}, 350);

$(window).scroll(function () {
try {
scrollAdjustmentTS();
} catch (e) {
console.error(e);
}
});

var adjustTimeoutTS;
$(window).resize(function () {
clearTimeout(adjustTimeoutTS);
adjustTimeoutTS = setTimeout(function () {
try {
resizeAdjustmentTS();
} catch (e) {
console.error(e);
}
}, 350);
});

$.when(window.Pages.angularToolbarComplete).done(function () {
try {
resizeAdjustmentTS();
} catch (e) {
console.error(e);
}
});
});

End Fixed Nav Adjustment

Move banner to outer wrap