In this episode, we'll learn how to fix an HTML element to the top of the page, based upon the current scroll position. This is a common feature in countless websites. We'll tackle the implementation in two steps. First, we'll get it to work in the simplest way possible. Then, we'll refactor toward a reusable component that can be applied anywhere.
Note: JavaScript is necessary to allow for this functionality across all browsers. However, if you have the means, you might instead use CSS to accomplish the same effect much more easily.