Headroom JS Method
Moving back into the HTML file open a new script tag at the very bottom before closing the body section. We need to use a large block of JS to initialize the Headroom plugin class while passing some optional parameters. The header variable targets the initial #header ID and stores this element to pass into the Headroom method. This element is all we actually need to initiate the plugin, but some optional parameters allow you to customize the effect. The first option tolerance is one of two object literals in this set. Basically it takes a list of key/value pairs and passes them into the function or method. The numeric values represent scrolled pixels before the header should re-appear or disappear. So for example once the header slides out of view the user needs to scroll 5px up before it slides back into view.