I don't exactly get this: outerHeight is calculated using outer.offsetHeight. Does that change over time ?

also, please do this in the else block of the next if, I don't feel like getting offsetHeight if we don't need it