n0f3
11/20/2015 - 4:08 AM

A collection of snippets from freecodecamp for reference

A collection of snippets from freecodecamp for reference

// This is to access the location from the browser.
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
  });
}