How to disable the animation scrollmagic for mobile resolution?

On the website, on the home page, you need to disable the testing of scrollmagic animation on mobile devices.

What is the procedure, how it (a)to do?
It is desirable on fingers.

Made through:
window.addEventListener("resize", function(){
 if (window.matchMedia("(min-width: 400px)").matches) {
}
}

and using:
$(window).on("resize", function(e) {
 if ($(window).width() > 400) {

But there is a "bug" either on the main page and other pages animations have stopped working, or on other pages of the animation is worked out after you resize a window, but in the main all right.
July 8th 19 at 11:35
1 answer
July 8th 19 at 11:37
The decision on the knee.
Depending on the screen resolution.
On your toes fail, you need to make changes in the script

Find more questions by tags JavaScriptjQuery