Skip to content
Snippets Groups Projects
Unverified Commit f1142411 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #1212 from OpenTechFund/fix/put-no-js-to-js-on-top

Run the no-js to js class switch as early as possible.
parents fe38f793 c94c04a9
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,9 @@
'use strict';
// Replace no-js with js class if js is enabled.
document.querySelector('html').classList.replace('no-js', 'js');
let Search = class {
static selector() {
return '.js-search-toggle';
......@@ -104,9 +107,6 @@
}
};
// Replace no-js with js class if js is enabled.
document.querySelector('html').classList.replace('no-js', 'js');
$(MobileMenu.selector()).each((index, el) => {
new MobileMenu($(el), $('.js-mobile-menu-close'), $('.header__menus--mobile'), $('.header__search'));
});
......@@ -155,4 +155,5 @@
const adminbarHeight = $('.admin-bar').outerHeight();
document.documentElement.style.setProperty('--header-admin-height', headerHeight + adminbarHeight + 'px');
});
})(jQuery);
......@@ -95,7 +95,7 @@ ol {
.no-js-hidden,
%no-js-hidden {
html.nojs & {
html.no-js & {
@extend %is-hidden;
}
}
......
......@@ -89,7 +89,7 @@ ol {
.no-js-hidden,
%no-js-hidden {
html.nojs & {
html.no-js & {
@extend %is-hidden;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment