Skip to content

Instantly share code, notes, and snippets.

@a-metta
Last active December 2, 2015 02:31
Show Gist options
  • Save a-metta/08722d0e61ac562b1682 to your computer and use it in GitHub Desktop.
Save a-metta/08722d0e61ac562b1682 to your computer and use it in GitHub Desktop.
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);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment