Add a early js script.

This commit is contained in:
Fredrik Jonsson 2020-08-24 02:08:30 +02:00
commit 88054afa22
2 changed files with 16 additions and 2 deletions

13
assets/js/script-early.js Normal file
View file

@ -0,0 +1,13 @@
/**
* @file
* A JavaScript file for the theme. Runs first, before jQuery etc. have loaded.
*/
(function () {
'use strict';
// Add a js class to the html-tag when JavsScript is active.
document.querySelector('html').classList.replace('nojs', 'js');
})();

View file

@ -7,7 +7,6 @@
'use strict';
// Add a js class to the html-tag when JavsScript is active.
$('html').removeClass('nojs').addClass('js');
// Place your code here.
})(u);