title: jquery mobile geolocation
body: <p>simple question.. how do I set a redirect if the user selects not allow for the geolocator pop up? If allow and error I have covered. works fine. But I' not sure how to set the not allow selection.</p>
  
  <pre><code>function showLocation(position) {
        var latitude = position.coords.latitude;
        var longitude = position.coords.longitude;
        //window.location = "/restaurant/latitude/40.714269/longitude/-74.005972/";
        window.location = "/restaurant/";
      }
  
      function errorHandler(err) {
        if(err.code == 1) {
              alert("Error: Can not access!");
        }else if( err.code == 2) {
              alert("Error: Position is unavailable!");
        }
      }
      function getLocation(){
  
         if(navigator.geolocation){
            // timeout at 60000 milliseconds (60 seconds)
            var options = {timeout:60000};
            navigator.geolocation.getCurrentPosition(showLocation, errorHandler, options);
         }else{
            alert("Sorry, browser does not support geolocation!");
         }
      }
  </code></pre>