cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

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.

            
              

<header>
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-12">
        <a href="/" class="logo">Scotch Panels</a>
        <a href="#" class="toggle-panel"><i class="fa fa-bars"></i></a>
      </div>
    </div>
  </div>
</header>


<div id="site-wrapper">
  <div id="scotch-panel"><!-- Left blank on purpose --></div>

    

    <article>
       <div class="container">
       
                <h1>Makes fixed navbar non-fixed - EXAMPLE 3</h1>
      <p class="lead"><a href="https://github.com/scotch-io/scotch-panels/issues/7">https://github.com/scotch-io/scotch-panels/issues/7</a></p>
              
         <p>This is it, this is it. This is life, the one you get, so go and have a ball. This is it, this is it. Straight ahead, and rest assured you can't be sure at all. So while you're here enjoy the view, keep on doing what you do, so hold on tight we'll muddle through one day at a time, one day at a time. So up on your feet, up on your feet - somewhere there's music playing. Don't you worry none, we'll just take it like it comes, one day at a time, one day at a time.</p>

<p>My bologna has a first name, it's O-s-c-a-r. My bologna has a second name, it's M-e-y-e-r. Oh, I love to eat it every day, and if you ask me why, I'll say: 'cuz Oscar Meyer has a way with b-o-l-o-g-n-a. How's that?</p>

<p>My name is Rhoda Morgenstern. I was born in the Bronx, New York in December of 1941. I've always felt responsible for World War II. The first thing I remember liking that liked me back was food. I had a bad puberty; it lasted seventeen years. I'm a high school graduate. I went to art school. My entrance exam was on a book of matches. I decided to move out of the house when I was twenty-four. My mother still refers to this as the time I ran away from home. Eventually, I ran to Minneapolis, where it's cold and I figured I'd keep better. Now I'm back in Manhattan. New York, this is your last chance!</p>


         <p>This is it, this is it. This is life, the one you get, so go and have a ball. This is it, this is it. Straight ahead, and rest assured you can't be sure at all. So while you're here enjoy the view, keep on doing what you do, so hold on tight we'll muddle through one day at a time, one day at a time. So up on your feet, up on your feet - somewhere there's music playing. Don't you worry none, we'll just take it like it comes, one day at a time, one day at a time.</p>

<p>My bologna has a first name, it's O-s-c-a-r. My bologna has a second name, it's M-e-y-e-r. Oh, I love to eat it every day, and if you ask me why, I'll say: 'cuz Oscar Meyer has a way with b-o-l-o-g-n-a. How's that?</p>

<p>My name is Rhoda Morgenstern. I was born in the Bronx, New York in December of 1941. I've always felt responsible for World War II. The first thing I remember liking that liked me back was food. I had a bad puberty; it lasted seventeen years. I'm a high school graduate. I went to art school. My entrance exam was on a book of matches. I decided to move out of the house when I was twenty-four. My mother still refers to this as the time I ran away from home. Eventually, I ran to Minneapolis, where it's cold and I figured I'd keep better. Now I'm back in Manhattan. New York, this is your last chance!</p>


      </div>
    </article>
  
</div>

<div id="fixed-nav">
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Services</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</div>
            
          
!
            
              /*==================================
=            SITE STUFF            =
==================================*/
a {
    text-decoration: none !important;
    -webkit-transition: all 225ms ease;
    -moz-transition: all 225ms ease;
    transition: all 225ms ease;
}
header {
  
    -webkit-transition: all 300ms ease;
    -moz-transition: all 300ms ease;
    transition: all 300ms ease;
  
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999999;
    background: #222;
    height: 50px;
}
header a {
    color: #777;
}
header a:hover {
    color: #fff;
}
header .logo {
    display: inline-block;
    height: 50px;
    line-height: 50px;
}
header .toggle-panel {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 25px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #333;
}
article {
    height: 1000px;
}




/*====================================
=            PANEL STYLES            =
====================================*/
#scotch-panel {
  display: none;
}
#site-wrapper {
  padding-top: 50px;
}
#site-wrapper .scotch-panel-canvas {
  z-index: 99999;
}
#fixed-nav {
    background: #444;
    position: fixed;
    height: 100%; 
    top: 0;
    right: 0;
    width: 70%;
    /* padding-top: 50px; */
}
#fixed-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}
#fixed-nav ul li a {
    display: block;
    width: 100%;
    height: 50px;
    line-height: 50px;
    background: transparent;
    color: #fff;
}
#fixed-nav ul li a:hover {
    background: #555;
}
article {
  background: #fff;
}

            
          
!
            
              /*
* https://panels.scotch.io
* https://github.com/scotch-io/scotch-panels/issues/7
*/

$(function() {

    $('#scotch-panel').scotchPanel({
        containerSelector: '#site-wrapper',
        direction: 'right',
        duration: 300,
        transition: 'ease',
        clickSelector: '.toggle-panel',
        distanceX: '70%',
        enableEscapeKey: true,
        
      beforePanelOpen: function() {
          $('header').css({
            '-moz-transform': 'translate3d(-70%, 0, 0)',
            '-ms-transform': 'translate3d(-70%, 0, 0)',
            '-o-transform': 'translate3d(-70%, 0, 0)',
            '-webkit-transform': 'translate3d(-70%, 0, 0)',
            'transform': 'translate3d(-70%, 0, 0)'
          });
        },
        beforePanelClose: function() {
          $('header').css({
            '-moz-transform': 'translate3d(0, 0, 0)',
            '-ms-transform': 'translate3d(0, 0, 0)',
            '-o-transform': 'translate3d(0, 0, 0)',
            '-webkit-transform': 'translate3d(0, 0, 0)',
            'transform': 'translate3d(0, 0, 0)'
          });
        }
    });

});
            
          
!
999px
Loading ..................

Console