Skip to content
Snippets Groups Projects
Select Git revision
  • 493618a0858a095fdca1eb41a8c1b73b80de8261
  • master default protected
  • jw
3 results

dev.py

Blame
  • Forked from Institut π / pi-cms
    Source project has a limited visibility.
    utils.js 447 B
    export const forEachNode = function (array, callback, scope) {
      for (var i = 0; i < array.length; i++) {
        callback.call(scope, array[i]); // passes back stuff we need
      }
    };
    
    export function getWindowWidth() {
      return Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
    }
    
    export function isMdScreenSize() {
      return getWindowWidth() >= 768;
    }
    
    export function isLgScreenSize() {
      return getWindowWidth() >= 1200;
    }