Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/normalize.min.css" rel="stylesheet" type="text/css" />
  <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  <link href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/css/foundation.min.css" rel="stylesheet" type="text/css" />
  <script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/vendor/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.0.3/js/foundation.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
  
  
<body>
  <div id="site-wrapper">
    <div id="site-canvas">
    
      
      <div id="site-menu">
        <h2>heading</h2>
        <nav>
          <ul class='outer'>
            <li><a href="#">Home</a></li>
            <li>
              <a href="#">Browse</a>
              <ul class="inner">
                <li><a href="#">News Archives</a></li>
                <li><a href="#">Announcement Archives</a></li>
                <li><a href="#">Project Archives</a></li>
                <li><a href="#">Event Archives</a></li>
              </ul>
            </li>
            <li><a href="#">Reference</a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
          </ul>
        </nav>
      </div>
    
      <a href="#" class="toggle-nav button" id="big-sexy"><i class="fa fa-bars"></i> Toggle Nav</a>
      <h1 class="text-center">Off Canvas Menu Tutorial</h1>
      <p class="lead text-center">Basic demo showing how to easily implement an Off Canvas Menu by <a href="http://scotch.io/tutorials/off-canvas-menus-with-css3-transitions-and-transforms">scotch.io</a>.</p>
    </div>
  </div>
  
</body>
</html>
 
$default-text-color:black;
#site-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 5000px; /* Temp: Simulates a tall page. */
}
#site-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  
  transform: translateX(0);
  transform: translate3d(0, 0, 0);
  transition: 300ms ease all;
  backface-visibility: hidden;
  
  
  #site-menu {
    width: 300px;
    height: 100%;
    position: absolute;
    top: 0;
    left: -280px;
    background: #428bca;
    
    //padding: 15px;
    nav{
      ul.outer{
        list-style-type:none;
        margin-left:0;
        li{
          width:100%;
          display:inline-block;
          border-top: 1px solid black;
        }
        a{
          color:$default-text-color;
          padding-left:10px;
        }
      }
      ul.inner{
        margin-left:0
      }
    }
  }
}
.show-nav #site-canvas {
  transform: translateX(280px);
  transform: translate3d(280px, 0, 0);
}
/* Just styles... Not relevant to demo */
body {
  box-shadow: inset 0 0 100px rgba(0,0,0,.5);
  background-color: #333;
  color: #fff;
}
#big-sexy {
  display: block;
  width: 300px;
  margin: 0 auto;
}
 
toggleNav = ->
  if $("#site-wrapper").hasClass("show-nav")
    $("#site-wrapper").removeClass "show-nav"
  else
    $("#site-wrapper").addClass "show-nav"
  return
$(document).ready ->
  $(".toggle-nav").click ->
    toggleNav()
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
kizzlebotpro
0viewers