On form submit scroll up only on desktop

Hi guys,
My form is pretty long and I had to use a script I found here on the Forum which works perfect. It scrolls page up bringing Success message in view. But it works on all devices. How to disable it on a tablet and everything smaller? Unfortunately, I couldn’t figure it out, my Javascript still needs work.

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Youi would need to create a conditional that uses the viewport width in its calculation. See .width() | jQuery API Documentation

I understand this in theory :sweat_smile:
What should be in the “else” part? I would really appreciate if you or somebody else could just type the lines of code here. A lot of other webflowers could use it as a ready to go solution