title: Reload page when a certain width is passed
body: <p>I want the page to reload only if the browser window goes above or below 768px.
  This was my attempt which failed. </p>
  
  <pre><code>if ($(window.width() &gt; "769") {
      $(window).resize(function () {
          if ($(window).width() &lt; "769") {
              location.reload();
          }
      });
  
  }
  elseif($(window.width() &lt; "769") {
  
      $(window).resize(function () {
          if ($(window).width() &gt; "769") {
              location.reload();
          }
      });
  
  }
  </code></pre>
  
  <p>Im sures theres a really simple way of doing this. </p>