Skip to content

Instantly share code, notes, and snippets.

@jondaiello
Last active February 8, 2016 14:29
Show Gist options
  • Save jondaiello/d6056c6281ff5a3ff74e to your computer and use it in GitHub Desktop.
Save jondaiello/d6056c6281ff5a3ff74e to your computer and use it in GitHub Desktop.
Expanding Menu
<nav class="global-nav">
<button class="mobile-only menu-link">Menu</button>
<ul class="global-nav--list">
<li class="home"><a href="#">Home</a></li>
<li><a href="#">Page</a></li>
<li><a href="#">Page</a></li>
<li><a href="#">Page</a></li>
<li><a href="#">Page</a></li>
</ul>
</nav>
$(function () {
// Main Menu reveal on phones
$('.menu-link').click(function (e) {
e.preventDefault();
$('.global-nav--list').slideToggle('fast');
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment