Skip to content

Instantly share code, notes, and snippets.

@andylobban
Created June 6, 2012 10:20
Show Gist options
  • Save andylobban/2881163 to your computer and use it in GitHub Desktop.
Save andylobban/2881163 to your computer and use it in GitHub Desktop.
<script>
$(window).resize(function() {
var size = window.getComputedStyle(document.body,':after').getPropertyValue('content');
if (size == 'hide') {
$('.secondary').addClass('hide');
$('.menu-link').addClass('hide');
}
if (size == 'show') {
$('.secondary').removeClass('hide');
$('.menu-link').removeClass('hide');
}
}).resize();
$('.menu-link').click(function() {
$('.secondary').toggle('slow');
$('.menu-link').toggleClass('less');
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment