Skip to content

Instantly share code, notes, and snippets.

@cduruk
Created August 3, 2010 23:59
Show Gist options
  • Save cduruk/507408 to your computer and use it in GitHub Desktop.
Save cduruk/507408 to your computer and use it in GitHub Desktop.
var getBottomY = function () {
var getElBottomY = function (el) {
return el.getHeight() + el.cumulativeOffset()[1];
};
articleEl = articleEl || $$('#article .first')[0] || $$('#content .hentry')[0] || $$('#main .hentry')[0];
cColumnEl = cColumnEl || $$('#main .cColumn')[0] || $$('#cCol')[0] || $$('#main .cColumn')[0];
// Compensate for extra space on ads for cColumnBottomY
var articleBottomY = getElBottomY(articleEl),
cColumnBottomY = getElBottomY(cColumnEl) + popUpElHeight - 30;
return (articleBottomY > cColumnBottomY) ? articleBottomY : cColumnBottomY;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment