##How to Add a Sticky Menu to the Top of Your Website
You might be wondering what a sticky menu is … and the answer is simple. When you scroll down the page of a website, you’ll see a navigation menu that literally sticks to the top of the screen. This is a great way to provide access to important pages on your website regardless of where your viewer is on the page.
####ADD A STICKY MENU
There are only a few steps required to create a sticky menu for your site. First you’ll need to download the Genesis Sample theme as you’ll need it to follow the steps below. If you are using one of our StudioPress themes or a custom Genesis theme, this will merely serve as guidance.
To get started, create a custom menu and head to Appearance > Menus > Manage Locations and assign your menu to the Secondary Navigation Theme Location.
After you’ve created your custom menu, there are 3 sets of code that you need to implement — functions.php, sticky-menu.js and style.css.
1. functions.php
Below is the code to add to your theme’s functions file. The first is the function that will enqueue the sticky-menu.js file and the second is the function that will reposition the Secondary Navigation menu at the top of your page.
2. sticky-menu.js
In your theme’s folder, create a new folder called js, and then create a new file inside the js folder called sticky-menu.js. Copy and paste the code below into the sticky-menu.js file. This will control the fade in/out effect on the sticky menu for your site.
Here’s what the path should look like: genesis-sample/js/sticky-menu.js
3. style.css
Lastly, add CSS to style your sticky menu to help make it stand out. Feel free to modify or add to this as necessary.
To get your menu links to align right as shown in the demo, add a sticky-right menu class in the CSS Classes option.