Answer the question
In order to leave comments, you need to log in
How to disable script loading for mobile devices and tablets?
Hello. I am making an adaptive template for the site and the idea came up to disable the display and generally download of slider files for mobile devices and tablets, because I want to increase the overall download speed. And the slider itself on such screens is not the topic. How can this be done? But in order not to simply hide the element, namely to disable the loading of slider files?
Answer the question
In order to leave comments, you need to log in
You can use a script to initialize scripts for sliders and other things, if the resolution (for example, in the width of the screen) is more than a certain size.
Something like:
if ($(window).width() > 600) {
slider();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question