A jQuery plugin that switches between multiple header designs as you scroll, so you always have a header that looks great with the content below it. Create your fixed nav (or header) as you typically would. Create your fixed nav (or header) as you typically would. You can use whatever markup suits you, just make sure the header works well with position:fixed. After that, take any sections of your page that need a different nav and add data-midnight="your-class" to it, where .your-class is the class you are going to use to style that header. If you don't use the property or just leave it blank, the .default class will be used for that section. You can style it in your CSS using the class .midnightHeader.your-class. Use whatever CSS or markup you like for each one. They will be switched automatically when necessary. To make everything work, just load midnight (and jQuery) and initialize it. We take care of the rest.
Features
- Midnight is available on Bower and NPM as midnight.js
- Make sure the header works well with position:fixed
- Multiple headers as necessary will be created based on the classes declared
- Create your fixed nav (or header) as you typically would
- You can use whatever markup suits you
- You can use a variety of custom options when using midnight