jQuery get the location of an element relative to window
Initially, Grab the .offset position of the element and calculate its relative position with respect to window Refer : 1. offset 2. scroll 3. scrollTop You can give it a try at this fiddle Following few lines of code explains how this can be solved when .scroll event is performed, we calculate the relative position … Read more