×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Steven Qual
Added: May 12, 2014 1:48 PM
Views: 21
  1. // RESIZE FUNCTIONS
  2.     jQuery(window).on('resize', function(e) {
  3.         windowWidth = jQuery(window).width();
  4.         windowHeight = jQuery(window).height();
  5.         bgHeight = (windowHeight * 90) / 100;
  6.  
  7.         jQuery('#background-image')
  8.                 .height(windowHeight)
  9.                 .width(windowWidth);
  10.  
  11.         var theFirstLevelWidth = jQuery('.main-navigation ul#menu-hauptmenue > li:nth-child(2)').width() - 1;
  12.         jQuery('.main-navigation ul#menu-hauptmenue > li:nth-child(2)').css('margin-right', theFirstLevelWidth + 'px');
  13.  
  14. //        jQuery('.main-navigation ul#menu-hauptmenue > li > a').setMainNavHeight();
  15.  
  16.     }).resize();