JSFiddle - React, Tailwind, and code Playground
HTML
<title>Untitled Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<body>
<div class="slideFix" id="navBar">
<div class="slideFix" id="navContent">
<a href="#" id="menu"><i class="fa fa-bars fa-2x" aria-hidden="true"></i></a>
<ul id="nav">
<li>
<a class="active">
<i class="fa fa-home" aria-hidden="true"></i> Home
</a>
</li>
<li>
<a href="#">
<i class="fa fa-shopping-basket" aria-hidden="true"></i> Store
</a>
</li>
<li>
<a href="#">
<i class="fa fa-comments" aria-hidden="true"></i> Forums
</a>
</li>
<li>
<a href="#">
<i class="fa fa-heart" aria-hidden="true"></i> Vote
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users" aria-hidden="true"></i> Users
</a>
</li>
<li>
<a href="#">
<i class="fa fa-envelope" aria-hidden="true"></i> Contact
</a>
</li>
</ul>
<div id="server" data-clipboard-text="play.climaxmc.org">
play.climaxmc.org
</div>
</div>
</div>
<a id="pull">Menu</a>
<ul class="test">
<li><a href="#">Home</a></li>
<li><a href="#">How-to</a></li>
<li><a href="#">Icons</a></li>
<li><a href="#">Design</a></li>
<li><a href="#">Web 2.0</a></li>
<li><a href="#">Tools</a></li>
</ul>
</body>
CSS
@charset "utf-8";
/* CSS Document */
/* START RESET */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
/* END RESET */
html {
height: 100%;
width: 100%;
}
body {
height: 100%;
width: 100%;
}
#navBar {
transition: all .25s ease-in-out;
-moz-transition: all .25s ease-in-out;
-webkit-transition: all .25s ease-in-out;
width: 100%;
height: 50px;
background-color: #FFF;
text-align: center;
border-bottom: 4px solid #349BD4;
position: fixed;
-webkit-box-shadow: 0 5px 5px rgba(0,0,0,.3);
-moz-box-shadow: 0 5px 5px rgba(0,0,0,.3);
box-shadow: 0 5px 5px rgba(0,0,0,.3);
}
#navBar #navContent {
transition: all .25s ease-in-out;
-moz-transition: all .25s ease-in-out;
-webkit-transition: all .25s ease-in-out;
display: inline-block;
height: 100%;
width: 1200px;
text-align: center;
margin-left: auto;
margin-right: auto;
background-color: #FFF;
}
#navBar #navContent ul {
transition: all .25s ease-in-out;
-moz-transition: all .25s ease-in-out;
-webkit-transition: all .25s ease-in-out;
background-color: #FFF;
height: 100%;
width: 800px;
float: left;
overflow:...
JavaScript
$(document).ready(function() {
$("#nav").hide();
$(function() {
var pull = $('#menu');
menu = $('#nav');
menuHeight = menu.height();
$("#menu").click(function() {
menu.slideToggle(200);
});
$("#pull").click(function() {
$(".test").slideToggle(700);
});
$(window).resize(function() {
var w = $(window).width();
if (w > 320 && menu.is(':hidden')) {
menu.removeAttr('style');
}
});
});
});