nacano
1/13/2017 - 9:11 AM

js base template

js base template

(function(w,d) {
  var resizeTimer = false;

  // Document load start functions
  (function () {
    // console.log(w.innerWidth,w.innerHeight);

  })();
  // Document load end functions
  function loadedFn() {

  }
  // Window resize functions
  function resizeFn() {

  }
  // Window resized functions
  function resizedFn() {

  }
  // Window Events
  w.onload = loadedFn;
  w.onresize = function() {
    if (resizeTimer !== false) {
      clearTimeout(resizeTimer);
    }
    resizeFn();
    resizeTimer = setTimeout( resizedFn, 200);
  };
})(window,document);