title: How to pass parameters to getCurrentPosition success call back?
body: <p>How can I pass in one or more parameters to a success call back when calling <code>navigator.geolocation.getcurrentPosition</code>?</p>
  
  <p>How can I pass <code>deviceready</code> from <code>foundLoc</code> to <code>getGeoLoc</code> method?</p>
  
  <pre><code>var app = {
  
      onDeviceReady: function () {
          alert = window.alert || navigator.notification.alert;
  
          app.getGeoLoc('deviceready');
      },
  
      getGeoLoc: function (id) {
          navigator.geolocation.getCurrentPosition(this.foundLoc, this.noLoc, { timeout: 3 });
      },
  
      foundLoc: function (position) {
          var parentElement = document.getElementById('deviceready'); 
          var lat = parentElement.querySelector('#lat');
          var long = parentElement.querySelector('#long');
  
          lat.innerHTML = position.coords.latitude;
          long.innerHTML = position.coords.longitude;
      },
  
      noLoc: function () {
          alert('device has no GPS or access is denied.');
      }
  };
  </code></pre>