title: Redirect to other page on swipe at window
body: <p>I try to redirect to another page if the users swipes left. </p>
  
  <p>I included these two files:</p>
  
  <pre><code>&lt;script src="js/jquery-2.2.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.mobile-1.4.5.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I tried it like this:</p>
  
  <pre><code>$(document).ready(main);
  
  function main()
  {
      $("window").on( "swipeleft", swipeleftHandler );
  
      function swipeleftHandler( event )
      {
          window.location.href = "index.php";
      }
  }
  </code></pre>
  
  <p>But nothing happens at all. No errors are thrown.</p>