I was getting the viewport height instead the html document height. I was able to get the right html document height by calling hashgrid on window load For example: $(window).load(function () { var grid = new hashgrid({ numberOfGrids: 2 }); });