$("body").outerHeight(true) was returning incorrect value, changing to $(document) resolved