Hidden elements on desktop still showing

Goodmorning and thanks for helping.
I’ve inserted a sliding gallery that contains 5 pictures. Each picture has a title and a description,inserted through the options of the gallery (the moment when you choose what pictures you want to insert to the gallery and the order of them).
I’ve hidden the gallery on the desktop version , in order to show it only on mobile, following an italian Wix tutorial that basically says this: https://www.picklewix.com/single-post/2018/04/24/Wix-Websites-Hide-elements-on-desktop-show-on-mobile .

The code I’ve inserted is:
import wixWindow from ‘wix-window’;

$w.onReady( function () {
if (wixWindow.formFactor === “Mobile”) {

Gallery 1 is hidden correctly.
On Gallery 2 the images are hidden but I still can see the title and description of the images sliding on the page. How do I hide them ?
Thank you very much!!