Created
February 19, 2018 21:53
-
-
Save projoomexperts/455d18102a659ca251f6533f2f9b6e7b to your computer and use it in GitHub Desktop.
Bigcommerce stencil revamped menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="m_Nav"> | |
<h3>Store Categories</h3> | |
<ul> | |
{{#each categories}} | |
<li> | |
<a href="{{url}}" alt="{{name}}" title="{{name}}">{{name}}</a> | |
</li> | |
{{/each}} | |
</ul> | |
<h3>Navigation</h3> | |
<ul> | |
<li><a href="/">Home</a></li> | |
<li><a href="/trucks">TRUCKS</a></li> | |
<li><a href="/cars">CARS</a></li> | |
<li><a href="/boats">BOATS</a></li> | |
<li><a href="/air">AIR</a></li> | |
<li><a href="/contact-us">Contact Us</a></li> | |
</ul> | |
</div> | |
<div class="allPage"> | |
</div> | |
<script> | |
jQuery(document).ready(function(){ | |
jQuery('.menuToggle').click(function( event ){ | |
event.preventDefault(); | |
jQuery('.menuToggle i').toggleClass('fa-times'); | |
jQuery('.menuToggle i').toggleClass('fa-bars'); | |
jQuery('.allPage').toggleClass('off-screen'); | |
jQuery('.m_Nav').toggleClass('on-screen'); | |
}) | |
}) | |
</script> | |
.allPage{ | |
transition:all .5s; | |
} | |
.allPage.off-screen{ | |
-webkit-transform:translateX(80%); | |
transform:translateX(80%); | |
position:fixed; | |
overflow-y:hidden; | |
left:0; | |
right:0; | |
width:100%; | |
} | |
.m_Nav{ | |
position:absolute; | |
bottom:0; | |
top:0; | |
z-index:0; | |
width:80%; | |
background-color:#333; | |
color:#fff; | |
display:none; | |
} | |
.m_Nav.on-screen{ | |
display:block; | |
position:fixed; | |
overflow-y:auto; | |
} | |
.m_Nav h3{ | |
background:#ddd; | |
color:#000; | |
margin:0; | |
padding:0 15px; | |
} | |
.m_Nav ul li a{ | |
text-decoration:none; | |
background:#272727; | |
display:block; | |
padding:5px 15px; | |
line-height:30px; | |
} | |
.m_Nav ul li{ | |
border-top:1px solid #1f1f1f; | |
border-bottom:1px solid #333; | |
} | |
.m_Nav ul { | |
list-style: none; | |
margin: 0px; | |
padding: 0px; | |
} | |
.m_Nav ul li a { | |
color: #ddd; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment