Skip to content

Instantly share code, notes, and snippets.

@yanns1

yanns1/block4.js Secret

Created June 29, 2020 17:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yanns1/82edf663c20c31294f400604479cadfe to your computer and use it in GitHub Desktop.
mql.addEventListener('change', (e) => {
const mobileView = e.matches;
if (mobileView) {
setNavInnerHTML(Component1);
} else {
setNavInnerHTML(Component2);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment