title: True/False depending on screen size dynamically?
body: <p>I'm following a guide that allows Google Map screen to disable scrolling depending on the screen size. The only part i'm struggling is to write a code that dynamically changes the True/False value when i resize the screen manually. </p>
  
  <p>This is the website that I followed the instruction but I can't seem to write the correct syntax code to produce the dynamic true false value depending on the screen size <a href="https://coderwall.com/p/pgm8xa/disable-google-maps-scrolling-on-mobile-layout" rel="nofollow noreferrer">https://coderwall.com/p/pgm8xa/disable-google-maps-scrolling-on-mobile-layout</a></p>
  
  <p>Part of the code that i need to use:</p>
  
  <pre><code>$(window).resize()
  </code></pre>
  
  <p>And then: </p>
  
  <pre><code>setOptions()
  </code></pre>
  
  <p>So I'm struggling to combine them together. </p>
  
  <p>I have tried something like this:</p>
  
  <pre><code>var dragging = $(window).width(function resize() {
      if (dragging &gt; 560) {
          return true;
      } else {
          return false;
      }
  });
  </code></pre>