Hide column background image on mobile

Hi guys,

I need you help. I’m trying to hide my column image background on mobile only. Can’t find a way to do it. I’ve tried to code but i don’t know the JS language so it’s turning pretty tricky and i don’ want to mess it up. Any help would be great. :sweat_smile:

Thank you !

I had the same problem. What I did is create a small image (10 px by 10 px) that was the same colour as my page background and replaced the column background image to the small coloured image if the form factor was mobile. Here is my code:

//  Code to replace the column background photo on mobile
import wixWindow from 'wix-window';

$w.onReady(function () {
  
    let deviceType = wixWindow.formFactor; 

    if (deviceType == "Mobile") {
        $w("#column26").background.src = "https://static.wixstatic.com/media/fad3ee_f56799110b104d368ce3d3f1ffcc377e~mv2.jpg";
        }
});

Full disclosure: I am not a developer and am relatively new to Velo so there may be better solutions, though this seems to work for me.