Answer the question
In order to leave comments, you need to log in
How to set up scripts for the mobile version of the site?
Friends, hello everyone!
Tell me how best to build scripts for the site.
For desktop and tablet, there are animations that are not needed in a mobile phone. What I want to do. First, check the browser width, and then run the necessary scripts depending on the screen width. In my opinion, this is better than doing a width check inside each script and depending on the results, run or not.
And how do you solve this problem?
Answer the question
In order to leave comments, you need to log in
That's right, you check the condition if (width <= mobile phone) (function {insert scripts}); something like this, it's the most logical thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question