Added functionality to allow for elements that change height while scrolling