';
}
function requestFile( url, callback ) {
const xhr = new XMLHttpRequest();
xhr.crossOrigin = 'anonymous';
xhr.open( 'GET', url, true );
xhr.onerror = function( xhr ) { console.log( 'error:', xhr ); };
// xhr.onprogress = function( xhr ) { console.log( 'bytes loaded: ' + xhr.loaded.toLocaleString() ) }; /// or something
xhr.onload = callback;
xhr.send( null );
}
function toggleNav() {
const left = 'calc( var( --mnu-width ) - 100px )';
if ( hamburger.style.left === '' || hamburger.style.left === left ) {
divMenu.style.left = 'calc( -1 * var( --mnu-width ) - 20px )';
hamburger.style.left = '-100px';
divContainer.style.marginLeft = '0';
} else {
divMenu.style.left = 0;
hamburger.style.left = left;
divContainer.style.marginLeft = 'var( --mnu-width )';
}
}