Created
January 6, 2015 22:24
-
-
Save egardner/dda8e4c409a98bade2d4 to your computer and use it in GitHub Desktop.
Data-driven Slide-out Menu for Jekyll
This file contains 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
--- | |
layout: null | |
library: jquery-2.1.3.min.js | |
--- | |
// If using a JS framework, include it here | |
{% include_relative _lib/{{page.library}} %} | |
// Application code goes here | |
$(document).ready(function(){ | |
$('.js-menu-trigger').on('click touchstart', function(e){ | |
$('.js-menu').toggleClass('is-visible'); | |
$('.js-menu-screen').toggleClass('is-visible'); | |
e.preventDefault(); | |
}); | |
$('.js-menu-screen').on('click touchstart', function(e){ | |
$('.js-menu').toggleClass('is-visible'); | |
$('.js-menu-screen').toggleClass('is-visible'); | |
e.preventDefault(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment