added matchmedia max-width=799px to js for auto classic (responsive) nav

This commit is contained in:
2021-12-09 20:38:40 +01:00
parent c634eb80f3
commit 9767f9ccfd
@@ -75,7 +75,10 @@ Drupal.behaviors.init_timeline.attach = function (context) {
function init(){ function init(){
if(readCookie('advanced-nav') != 'yes' && readCookie('classic-nav') != 'yes'){ let isMobile = window.matchMedia("only screen and (max-width: 799px)").matches;
if(isMobile){
initClassic();
}else if(readCookie('advanced-nav') != 'yes' && readCookie('classic-nav') != 'yes'){
$.getJSON(_drupalBasePath+'perfart/ajax/home', function(data){ $.getJSON(_drupalBasePath+'perfart/ajax/home', function(data){
console.log('data', data); console.log('data', data);