Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <nav id="navSidebar">
  <header id="navHeader" style="background:url('http://www.tactivedigital.com/wp-content/uploads/2015/03/slide1.jpg') no-repeat center center; background-size: cover; overflow: hidden;">
    <div class="row">
      <div class="col">
      </div>
    </div>
  </header>
  <section class="container" id="breadcrumbs">
    <div class="row">
      <ul class="col">
        <li><a href="">Work</a>&nbsp;<span uk-icon="icon: chevron-right"></span></li>
        <li>Project Name</li>
      </ul>
    </div>
  </section>
  <section class="container" id="one">
    <div class="row">
      <ul class="col">
        <li class="header">Jump to</li>
        <a href=""><li><span>i.</span><span>Introduction</span></li></a>
        <a href=""><li><span>ii.</span><span>Project Details</span></li></a>
        <a href=""><li><span>iii.</span><span>Conception</span></li></a>
        <a href=""><li><span>iv.</span><span>Components</span></li></a>
        <a href=""><li><span>v.</span><span>Development</span></li></a>
        <a href=""><li><span>vi.</span><span>Milestones</span></li></a>
        <a href=""><li><span>vii.</span><span>Issues &amp; Resolutions</span></li></a>
        <a href=""><li><span>viii.</span><span>Conclusion (tl;dr)</span></li></a>
        <a href=""><li><span>ix.</span><span>Demo</span></li></a>
      </ul>
    </div>
  </section>
  <section class="container" id="two">
    <div class="row">
      <ul class="col">
        <li class="header">Nav</li></a>
        <a href=""><li>Home</li></a>
        <a href=""><li>Work</li></a>
        <a href=""><li>About</li></a>
        <a href=""><li>Contact</li></a>
        <a href=""><li>Social</li></a>
        <a href=""><li>README.md</li></a>
      </ul>
    </div>
  </section>
</nav>
<main class="container" id="mainContent">
  
  <h2><a id="menu">Click me to see! <span class="uk-icon" uk-icon="menu"></span></a></h2>
  <p>Do so written as raising parlors spirits mr elderly. Made late in of high left hold. Carried females of up highest calling. Limits marked led silent dining her she far. Sir but elegance marriage dwelling likewise position old pleasure men. Dissimilar themselves simplicity no of contrasted as. Delay great day hours men. Stuff front to do allow to asked he.</p>
  <p>Advanced extended doubtful he he blessing together. Introduced far law gay considered frequently entreaties difficulty. Eat him four are rich nor calm. By an packages rejoiced exercise. To ought on am marry rooms doubt music. Mention entered an through company as. Up arrived no painful between. It declared is prospect an insisted pleasure.</p>
  <p>Denote simple fat denied add worthy little use. As some he so high down am week. Conduct esteems by cottage to pasture we winding. On assistance he cultivated considered frequently. Person how having tended direct own day man. Saw sufficient indulgence one own you inquietude sympathize.</p>
  <p>Same an quit most an. Admitting an mr disposing sportsmen. Tried on cause no spoil arise plate. Longer ladies valley get esteem use led six. Middletons resolution advantages expression themselves partiality so me at. West none hope if sing oh sent tell is.</p>
  <p>Why painful the sixteen how minuter looking nor. Subject but why ten earnest husband imagine sixteen brandon. Are unpleasing occasional celebrated motionless unaffected conviction out. Evil make to no five they. Stuff at avoid of sense small fully it whose an. Ten scarcely distance moreover handsome age although. As when have find fine or said no mile. He in dispatched in imprudence dissimilar be possession unreserved insensible. She evil face fine calm have now. Separate screened he outweigh of distance landlord.</p>
  <p>Stronger unpacked felicity to of mistaken. Fanny at wrong table ye in. Be on easily cannot innate in lasted months on. Differed and and felicity steepest mrs age outweigh. Opinions learning likewise daughter now age outweigh. Raptures stanhill my greatest mistaken or exercise he on although. Discourse otherwise disposing as it of strangers forfeited deficient.</p>
  <p>Prepared do an dissuade be so whatever steepest. Yet her beyond looked either day wished nay. By doubtful disposed do juvenile an. Now curiosity you explained immediate why behaviour. An dispatched impossible of of melancholy favourable. Our quiet not heart along scale sense timed. Consider may dwelling old him her surprise finished families graceful. Gave led past poor met fine was new.</p>
  <p>Residence certainly elsewhere something she preferred cordially law. Age his surprise formerly mrs perceive few stanhill moderate. Of in power match on truth worse voice would. Large an it sense shall an match learn. By expect it result silent in formal of. Ask eat questions abilities described elsewhere assurance. Appetite in unlocked advanced breeding position concerns as. Cheerful get shutters yet for repeated screened. An no am cause hopes at three. Prevent behaved fertile he is mistake on.</p>
  <p>By in no ecstatic wondered disposal my speaking. Direct wholly valley or uneasy it at really. Sir wish like said dull and need make. Sportsman one bed departure rapturous situation disposing his. Off say yet ample ten ought hence. Depending in newspaper an september do existence strangers. Total great saw water had mirth happy new. Projecting pianoforte no of partiality is on. Nay besides joy society him totally six.</p>
  
</main>

<div id="navFade"></div>
              
            
!

CSS

              
                body {
  width: 100%;
  height: 100%;
}

#navFade {
  display: none;
  z-index: 99;
  content: "";
  // background: url('http://www.tripwiremagazine.com/wp-content/uploads/2013/05/7.jpg') no-repeat center center;
  background-size: cover;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  // background-blend-mode: hard-light;
  // filter: grayscale(75%);
}

.noscroll {
  overflow: hidden;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#navSidebar {
  background: #eee;
  width: 256px;
  height: 100%;
  overflow-y: scroll;
  margin: 0;
  // box-shadow: 8px 5px 20px rgba(0,0,0,0.19), 4px 0 6px rgba(0,0,0,0.23);
  position: fixed;
  top: 0;
  bottom: 0;
  left: -256px;
  z-index: 999;
  
  & #navHeader {
    background: #505050;
    width: 100%;
    height: 150px;
    border-bottom: none;
    margin-bottom: 0; // .75rem
    display: flex;
    align-items: center;
    justify-content: center;
    & h2 {
      color: white;
      font-size: 1.25rem;
      line-height: 1;
      margin: 0;
    }
  }
  
  & #breadcrumbs {
    padding-bottom: 0; // .5rem
    & ul > li {
      display: inline-block;
    }
    & .uk-icon {
      position: relative;
      top: -1px;
    }
  }
  
  & #one li {
    flex-direction: row;
    justify-content: flex-start;
    & span {
      min-width: 25px;
    }
  }
  
  & section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px dotted rgba(0,0,0,.25);
    &:last-child { border-bottom: none; }
  }
  
  & li {
    font-family: ClearFont, sans-serif;
    font-size: 12px;
    letter-spacing: .5px;
    line-height: 1;
    margin: 0;
    padding: .5rem 0;
    
    &.header {
      font-size: 16px;
      text-transform: uppercase;
      letter-spacing: 0;
      font-family: Arial;
      font-weight: bold;
      color: rgba(0,0,0,.65);
    }
  }
}
              
            
!

JS

              
                $(document).ready(function() {
  
  // set vars for this function
  let sidebar      = $("#navSidebar");
  let sidebarList1 = $("#one li");
  let sidebarList2 = $("#two li");
  let body         = $("body");
  let main         = $("#mainContent");
  let dark         = $("#navFade");
  let bounceIn     = "transition.bounceIn";
  let bounceDownIn = "transition.bounceDownIn";
  let slideLeftIn  = "transition.slideLeftIn";
  let slideRightIn = "transition.slideRightIn";
  let slideUpIn    = "transition.slideUpIn";
  let slideDownIn  = "transition.slideDownIn";
  let fadeIn       = "transition.fadeIn";
  let fadeOut      = "transition.fadeOut";
   
  // animate sidebar slidein on click
  $("#menu").on("click", function() {
    sidebar.velocity({ 
      translateX: "256px"
    }, 600, [ 30, 15 ])
    // SPRING PHYSICS
    // Pass a two-item array in the form of [ tension, friction ].
    // A higher tension (default: 500) increases total speed and bounciness.
    // A lower friction (default: 20) increases ending vibration speed.
    
    // animate nav entry
    sidebarList1.velocity( slideLeftIn, {
      stagger: 0,
      drag: true,
      display: "flex" })
    sidebarList2.velocity( slideLeftIn, {
      stagger: 0,
      drag: true })
    $("#breadcrumbs").velocity( slideLeftIn, {
      stagger: 0,
      drag: true })
    $("#navHeader .row").velocity( slideDownIn, {
      display: "flex" });
    
    // fade and blur background
    dark.velocity( fadeIn, 300);
    
    body.addClass("noscroll");
  }); // end open sidebar
  
  // sidebar close on content click
  $("#navFade").on("click", function() {
    sidebar.velocity("reverse")
    dark.velocity(fadeOut, 300)
    main.velocity("reverse");
    body.removeClass("noscroll");
  }); // end close sidebar
  
});
              
            
!
999px

Console