In this simple tweak, we give you a code snippet to remove your back to top button on mobile or tablet devices.
The back to top button is a usability issue for mobile because it covers page content. One alternative is to not use a back to top button, however, you will lose the advantage of having this button on desktops.
The ideal situation is to have a back to top button on the desktop and to hide it on mobile.
This code will work for any page powered by the Divi Theme.
It hides the back to the top button when you are on a device that has a screen size smaller than the media query value.
To learn more check out the video.
You can get the snippet via the below code snippet on gist.
You can also get the code directly on gist.
Don’t forget to get more tweaks and edits on our youtube channel or via the blog.