Skip to content

Commit

Permalink
check mob on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
dergachevm committed Oct 4, 2024
1 parent 44517ab commit bf0d918
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ class App {
this.toggleNav(this.body);
});

window.addEventListener('resizle', () => {
this.isMobile = this.width < 1024;
});

this.DOM.scrollLink?.forEach((el, i) => {
el.addEventListener('click', (e) => {
let link = el.getAttribute('href');
Expand Down

0 comments on commit bf0d918

Please sign in to comment.