Browse Source

Scope js to it's own IIFE

pm2
Luke Childs 8 years ago
parent
commit
447642fea4
  1. 18
      public/assets/enhancements.js

18
public/assets/enhancements.js

@ -1,8 +1,12 @@
// Check if DOM has already loaded as we're loading async
['interactive', 'complete'].indexOf(document.readyState) >= 0
? init()
: document.addEventListener('DOMContentLoaded', init);
(function() {
// When DOM is ready
function init() {
}
// Check if DOM has already loaded as we're loading async
['interactive', 'complete'].indexOf(document.readyState) >= 0
? init()
: document.addEventListener('DOMContentLoaded', init);
// When DOM is ready
function init() {
}
})();

Loading…
Cancel
Save