Streaming live at 10am (PST)

How to disable map scrolling using Google API on webflow sites


I wanted to disable scrolling maps on mobile devices,
So I added this code to the initMaps function in webflow.js

var isDraggable = $(document).width() > 480 ? true : false;
var mapOptions = {
draggable: isDraggable,

But When testing it, it didn’t work;
What could have gone wrong?

Thanks in Advance.

You probably want

var isDraggable = $(window).width() > 480;