Updated Lock to top to work with multiple elements on a page