Tether is a JavaScript library for efficiently making an absolutely positioned element stay next to another element on the page.
It aims to be the canonical implementation of this type of positioning, such that you can build products, not positioning libraries.
Take a look at the documentation for a more detailed explanation of why you should star it now to remember it for your next project.