Answer the question
In order to leave comments, you need to log in
How to disable specific js file based on screen resolution?
Good day.
I'm using the Bootstrap grid, everything else from it is disabled. Added a script for vertical full-screen scrolling of content sections. Sections have 100% width and height, overflow property is hidden. Everything looks decent on a PC/laptop, the content fits into the blocks, but if you decrease the window size, only part of the content is visible, the rest is hidden due to overflow: hidden. Therefore, for small screen resolutions, I want to disable this script so that there is a standard scrolling, and not in sections.
In Google I found ways through if (with such a screen) {do this} else {do that}, but they are few, that is, they do not work at all.
Therefore, I turn here: how to disable a JS file depending on the size of the window? So to speak, media queries for JS, or something.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question