fix menu position

This commit is contained in:
rulingcom 2021-12-07 06:21:20 +00:00
parent 551f90ece8
commit a505955cfd
1 changed files with 15 additions and 4 deletions

View File

@ -857,12 +857,22 @@ function transdate(){
}); });
}); });
function calc_menu_pos(){
if ($(window).outerWidth() < 769){
$('.modules-menu-level-1').css('right','')
$('.modules-menu-level-1').css('width','')
}else{
var width = $('#main-nav').outerWidth();
var right = $(window).width() - $('#main-nav').offset().left - width;
$('.modules-menu-level-1').css('right',right)
$('.modules-menu-level-1').css('width',width)
}
}
$(document).resize(function() { $(document).resize(function() {
$('.modules-menu-level-1').css('left','-'+$('.outdropdowns .dropdowns').offset().left+'px'); //$('.modules-menu-level-1').css('left','-'+$('.outdropdowns .dropdowns').offset().left+'px');
if ($(window).outerWidth() < 769){ calc_menu_pos();
$('.modules-menu-level-1').css('left','')
}
window.has_hover = false; window.has_hover = false;
if($(window).outerWidth(true) >= 768){ if($(window).outerWidth(true) >= 768){
window.has_hover = true; window.has_hover = true;
@ -870,6 +880,7 @@ function transdate(){
}); });
$(window).load(function(){ $(window).load(function(){
calc_menu_pos();
$("iframe[src*='google']").attr('title','googleOauth'); $("iframe[src*='google']").attr('title','googleOauth');
}); });