Streaming live at 10am (PST)

Disable class for a particular viewport?

Hi, I have added a class .swipe to the body of pages that calls custom code to allow the user to swipe between pages. Is it possible to add the class to the body of on Tablet, Mobile landscape and Mobile portrait but not desktop? I want to stop user swiping on desktop with mouse action (eg. selecting text)

One workaround could be duplicate your section/elements and disable the view for desktop/mobile at your convenience? :thinking:

1 Like
// Add swipe class to body when width < 960
$('body').toggleClass('swipe', $('body').width() < 960);

Thanks samliew, you keep saving me! Here is a link to my website which went live today, all built in webflow! Will continue to fix it up and add some more stuff over the next few days, the forum here has been of great help.