Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Centered menu js (max-width)

  • Loading branch information...
commit 49ad411f4b523fd9e97f271676caa9fdc270961a 1 parent d0bb1e1
@Nickolay-SM Nickolay-SM authored
Showing with 1 addition and 2 deletions.
  1. +0 −1  js/init.js
  2. +1 −1  js/init.min.js
View
1  js/init.js
@@ -83,7 +83,6 @@ function autoWidthMenu () {
} else {
vElemsWidth = jQuery('.site-navigation').outerWidth() + 20;
}
- vElemsWidth = vElemsWidth + 50;
jQuery('.menu-wrapper').css({'max-width': vElemsWidth + 'px'})
} else {
jQuery('.menu-wrapper').css({'max-width': 'none'})
View
2  js/init.min.js
@@ -1 +1 @@
-function autoWidthMenu(){var e=0;if(jQuery(".menu-wrapper").hasClass("center-pos")){if(jQuery(".cart-button").length>0||jQuery("#header_language_select").length>0){if(jQuery(".cart-button").length>0){e+=jQuery(".cart-button").outerWidth()}if(jQuery("#header_language_select").length>0){e+=jQuery("#header_language_select").outerWidth()}e+=jQuery(".site-navigation").outerWidth()}else{e=jQuery(".site-navigation").outerWidth()+20}e=e+50;jQuery(".menu-wrapper").css({"max-width":e+"px"})}else{jQuery(".menu-wrapper").css({"max-width":"none"})}}jQuery(document).ready(function(e){e(".menu").mobileMenu({defaultText:"Navigate to...",className:"select-menu",subMenuDash:"&nbsp;&nbsp;&ndash;"});e("#wp-calendar td:not(#next, #prev):has(a)").addClass("cal_has_posts");e("article.format-image .entry-content a img").each(function(t){e(this).parent("a").addClass("fancybox")});if(e(".fancybox").length>0){e(".fancybox").fancybox({overlayShow:true,transitionIn:"elastic",transitionOut:"elastic",padding:0,autoScale:false,speedIn:250,speedOut:250,width:800,height:600,overlayOpacity:.25,overlayColor:"#000",autoScale:true,autoDimensions:false,centerOnScroll:true})}e("#back-top a").click(function(){e("body,html").animate({scrollTop:0},850);return false});if(e(".tabbed-nav").length>0){e(".tabbed-nav").easyResponsiveTabs({type:"vertical",width:"auto",fit:true})}e(".menu li:has(ul)").mobileMenuDropdown();e(window).resize()});jQuery(window).bind("resize",function(){vhGroupClass=jQuery(".responsive #page .container header .header-hgroup").data("originalstyle");vmWrapperClass=jQuery(".responsive #page .container header .menu-wrapper").data("originalstyle");if(jQuery(window).width()<=767){if(jQuery(".responsive .cart-button").length>0){jQuery(".responsive .select-menu").css({"max-width":"80%",margin:"6px 0 25px 0"})}jQuery(".responsive #page .container header .header-hgroup").removeClass(vhGroupClass).addClass("center-pos");jQuery(".responsive #page .container header .menu-wrapper").removeClass(vmWrapperClass).addClass("center-pos")}else{jQuery(".select-menu").css({"max-width":"none",margin:"0 0 25px 0"});jQuery(".responsive #page .container header .header-hgroup").removeClass("center-pos").addClass(vhGroupClass);jQuery(".responsive #page .container header .menu-wrapper").removeClass("center-pos").addClass(vmWrapperClass)}autoWidthMenu();jQuery(window).scroll()});jQuery(window).bind("scroll",function(){var e=false;var t=jQuery("#page").outerHeight();var n=jQuery(window).height();var r=jQuery(".head-container").outerHeight();if(t-n>0){if(t-n-(r+125)>r){e=true}}if(ThGlobal.is_fixed_header!=-1&&e){if(jQuery(this).scrollTop()+50>r){if(jQuery("#wpadminbar").length>0){jQuery(".head-container").addClass("fixed is_indent")}else{jQuery(".head-container").addClass("fixed")}}else{jQuery(".head-container").removeClass("fixed is_indent")}}else{jQuery(".head-container").removeClass("fixed is_indent")}if(jQuery(window).scrollTop()+jQuery(window).height()==jQuery(document).height()){jQuery("#back-top").fadeIn("slow")}else{jQuery("#back-top").fadeOut("slow")}})
+function autoWidthMenu(){var e=0;if(jQuery(".menu-wrapper").hasClass("center-pos")){if(jQuery(".cart-button").length>0||jQuery("#header_language_select").length>0){if(jQuery(".cart-button").length>0){e+=jQuery(".cart-button").outerWidth()}if(jQuery("#header_language_select").length>0){e+=jQuery("#header_language_select").outerWidth()}e+=jQuery(".site-navigation").outerWidth()}else{e=jQuery(".site-navigation").outerWidth()+20};jQuery(".menu-wrapper").css({"max-width":e+"px"})}else{jQuery(".menu-wrapper").css({"max-width":"none"})}}jQuery(document).ready(function(e){e(".menu").mobileMenu({defaultText:"Navigate to...",className:"select-menu",subMenuDash:"&nbsp;&nbsp;&ndash;"});e("#wp-calendar td:not(#next, #prev):has(a)").addClass("cal_has_posts");e("article.format-image .entry-content a img").each(function(t){e(this).parent("a").addClass("fancybox")});if(e(".fancybox").length>0){e(".fancybox").fancybox({overlayShow:true,transitionIn:"elastic",transitionOut:"elastic",padding:0,autoScale:false,speedIn:250,speedOut:250,width:800,height:600,overlayOpacity:.25,overlayColor:"#000",autoScale:true,autoDimensions:false,centerOnScroll:true})}e("#back-top a").click(function(){e("body,html").animate({scrollTop:0},850);return false});if(e(".tabbed-nav").length>0){e(".tabbed-nav").easyResponsiveTabs({type:"vertical",width:"auto",fit:true})}e(".menu li:has(ul)").mobileMenuDropdown();e(window).resize()});jQuery(window).bind("resize",function(){vhGroupClass=jQuery(".responsive #page .container header .header-hgroup").data("originalstyle");vmWrapperClass=jQuery(".responsive #page .container header .menu-wrapper").data("originalstyle");if(jQuery(window).width()<=767){if(jQuery(".responsive .cart-button").length>0){jQuery(".responsive .select-menu").css({"max-width":"80%",margin:"6px 0 25px 0"})}jQuery(".responsive #page .container header .header-hgroup").removeClass(vhGroupClass).addClass("center-pos");jQuery(".responsive #page .container header .menu-wrapper").removeClass(vmWrapperClass).addClass("center-pos")}else{jQuery(".select-menu").css({"max-width":"none",margin:"0 0 25px 0"});jQuery(".responsive #page .container header .header-hgroup").removeClass("center-pos").addClass(vhGroupClass);jQuery(".responsive #page .container header .menu-wrapper").removeClass("center-pos").addClass(vmWrapperClass)}autoWidthMenu();jQuery(window).scroll()});jQuery(window).bind("scroll",function(){var e=false;var t=jQuery("#page").outerHeight();var n=jQuery(window).height();var r=jQuery(".head-container").outerHeight();if(t-n>0){if(t-n-(r+125)>r){e=true}}if(ThGlobal.is_fixed_header!=-1&&e){if(jQuery(this).scrollTop()+50>r){if(jQuery("#wpadminbar").length>0){jQuery(".head-container").addClass("fixed is_indent")}else{jQuery(".head-container").addClass("fixed")}}else{jQuery(".head-container").removeClass("fixed is_indent")}}else{jQuery(".head-container").removeClass("fixed is_indent")}if(jQuery(window).scrollTop()+jQuery(window).height()==jQuery(document).height()){jQuery("#back-top").fadeIn("slow")}else{jQuery("#back-top").fadeOut("slow")}})
Please sign in to comment.
Something went wrong with that request. Please try again.