Last active
December 24, 2015 02:49
-
-
Save pixelite/6733049 to your computer and use it in GitHub Desktop.
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
#navigation #main-menu li { | |
-webkit-border-radius: 7px | |
-moz-border-radius: 7px; | |
border-radius: 7px; | |
background: green; | |
box-sizing: border-box; | |
width: 45%; | |
float: left; | |
margin: 5px; | |
padding: 10px 0; | |
text-align: center; | |
} |
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
(function ($, Drupal, window, document, undefined) { | |
Drupal.behaviors.toggleMenu = { | |
attach: function(context) { | |
// $("#navigation #main-menu").tinyNav(); | |
var menu_toggle = $('<div class="menu-toggle" />'); | |
$("#navigation").prepend(menu_toggle); | |
$("#navigation .menu-toggle").click(function() { | |
$("#navigation #main-menu").slideToggle(); | |
}); | |
$(window).resize(function() { | |
if ($(this).width() < 480) { | |
$('#navigation #main-menu').hide(); | |
} | |
else { | |
$('#navigation #main-menu').show(); | |
} | |
}); | |
} | |
} | |
}) (jQuery, Drupal, this, this.document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment