Skip to content

Instantly share code, notes, and snippets.

@and1truong
Created October 31, 2012 15:24
Show Gist options
  • Select an option

  • Save and1truong/3987649 to your computer and use it in GitHub Desktop.

Select an option

Save and1truong/3987649 to your computer and use it in GitHub Desktop.
// JavaScript Document
(function($){
Drupal.behaviors.lang_dropdown.attach = function(context, settings) {
$('.arrow-button').click(function () {
if( $('.block-main-menu .content ul.menu').css('height') == '38px') {
$('.block-main-menu .content ul.menu').css("height","306px");
$('.zone-branding-wrapper').css("height", "306px");
$('header').css("height", "306px");
}
else {
$('.block-main-menu .content ul.menu').css("height","38px");
$('.zone-branding-wrapper').css("height", "38px");
$('header').css("height", "255px");
}
});
function resize() {
if( $('.zone-branding-wrapper .container-12').css('width') == '960px' || $('.zone-branding-wrapper .container-12').css('width') == '1200px' ){
$('.block-main-menu .content ul.menu').css("height","38px");
$('.zone-branding-wrapper').css("height", "38px");
$('header').css("height", "255px");
}
}
$(window).resize(resize);
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment