Skip to content

Instantly share code, notes, and snippets.

@n0f3
Last active December 2, 2015 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n0f3/08722d0e61ac562b1682 to your computer and use it in GitHub Desktop.
Save n0f3/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